J
julian
hi
I was wondering if anyone can help me out on this....
I have dynamcally populated a drop down menu with data from an access
database using ASP. The values seem fine, however when i pass them to
the next page (using form get method) the whitespaces in the values
are ignored. For example with <option value=jim jones> then only "jim"
gets passed to the next page not "jim jones". I have viewed the source
created on the dynamic page and the values are populated fine, but
passing to the next page seems to be problematic...
My code....
<form name="search2"
<%if registered then%>
action="xresults1.asp"
<%else%>
action="xresults.asp"
<%end if%>
method="get">
<%
if isempty(Application("Recordset2strcacheUsers")) then
Set db = Server.CreateObject("ADODB.Connection")
db.Open MM_database2_STRING
Set Recordset2 = db.Execute("SELECT DISTINCT Field2 FROM IaxData WHERE
Field19 = '1'")
'*******populate drop down list********
Recordset2str = "<SELECT NAME=subject><OPTION
value=choose>Subject</OPTION>"
while not Recordset2.eof
Recordset2str = Recordset2str & "<OPTION VALUE=" &
Recordset2.fields("Field2") & ">" & Recordset2.fields("Field2") &
"</OPTION>"
Recordset2.moveNext
wend
Recordset2str = Recordset2str & "</SELECT>"
Response.write("<br>from database<br>" & Recordset2str)
'********write to cache***********
Application.lock()
Application("Recordset2strcacheUsers") = Recordset2str
Application.unlock()
db.Close
Set db = Nothing
else
' Write from cache
Response.write("<BR>from cache<BR>" & Application
("Recordset2strcacheUsers"))
end if
%>
</form>
I was wondering if anyone can help me out on this....
I have dynamcally populated a drop down menu with data from an access
database using ASP. The values seem fine, however when i pass them to
the next page (using form get method) the whitespaces in the values
are ignored. For example with <option value=jim jones> then only "jim"
gets passed to the next page not "jim jones". I have viewed the source
created on the dynamic page and the values are populated fine, but
passing to the next page seems to be problematic...
My code....
<form name="search2"
<%if registered then%>
action="xresults1.asp"
<%else%>
action="xresults.asp"
<%end if%>
method="get">
<%
if isempty(Application("Recordset2strcacheUsers")) then
Set db = Server.CreateObject("ADODB.Connection")
db.Open MM_database2_STRING
Set Recordset2 = db.Execute("SELECT DISTINCT Field2 FROM IaxData WHERE
Field19 = '1'")
'*******populate drop down list********
Recordset2str = "<SELECT NAME=subject><OPTION
value=choose>Subject</OPTION>"
while not Recordset2.eof
Recordset2str = Recordset2str & "<OPTION VALUE=" &
Recordset2.fields("Field2") & ">" & Recordset2.fields("Field2") &
"</OPTION>"
Recordset2.moveNext
wend
Recordset2str = Recordset2str & "</SELECT>"
Response.write("<br>from database<br>" & Recordset2str)
'********write to cache***********
Application.lock()
Application("Recordset2strcacheUsers") = Recordset2str
Application.unlock()
db.Close
Set db = Nothing
else
' Write from cache
Response.write("<BR>from cache<BR>" & Application
("Recordset2strcacheUsers"))
end if
%>
</form>