JElster
asked on
Classic ASP - Help getting hidden value
I have a hidden value on a page.
<input type="hidden" name="noteId" id="noteId"/>
I can 'see' the value in the HTML. Next I need to get that value to run a query.
But the following next line is always null
<%
Response.write(request.for m("noteId" ))
' Run query based on noteId HERE
%>
Any ideas what I am doing wrong?
thx
<input type="hidden" name="noteId" id="noteId"/>
I can 'see' the value in the HTML. Next I need to get that value to run a query.
But the following next line is always null
<%
Response.write(request.for
' Run query based on noteId HERE
%>
Any ideas what I am doing wrong?
thx
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can't do that directly with javascript/jquery. I do see an issue with your if statement.
if NOT(IsNull(request.form("n oteId")) or request.form("noteId")="") then
should be
if NOT(IsNull(request.form("n oteId")) AND request.form("noteId")<>"" ) then
Is a form being submitted here? or do you need to use the value that is typed into <input type="hidden" name="noteId" id="noteId"/>? If that is the case, we need to use ajax where we use javascript/jquery to grab the value entered and submit to another asp page, grab the output and bring it to the current page or redirect to another.
if NOT(IsNull(request.form("n
should be
if NOT(IsNull(request.form("n
Is a form being submitted here? or do you need to use the value that is typed into <input type="hidden" name="noteId" id="noteId"/>? If that is the case, we need to use ajax where we use javascript/jquery to grab the value entered and submit to another asp page, grab the output and bring it to the current page or redirect to another.
ASKER
Any way put the noteID in a session using JS and just call Session("noteID");
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thx
<input type="hidden" name="noteId" id="noteId"/>
<br/>
<!-- Get Current Note Record -->
<%
if NOT(IsNull(request.form("n
strSql = "SELECT * FROM NOTES WHERE NOTEID = " + request.form("noteId")
'Test
Response.write(strSql)