Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Dynamic Jump Menu

Status
Not open for further replies.

Jovix

Programmer
Dec 3, 2003
39
US
I hope this is an easy one for you guys. I have a search page that contains 3 jump menus, the jump menus are used as lists for search criteria, and the lists are populated from a database. The lists also changes depending on what the user chooses. So if a user chooses Honda on the first list, the second list shows, accord, civic, CRV, etc... I think you get the picture.

My problem is that the jump menus reset themselves after selecting from the lists. for example I select honda, the jump menu does it's thing, the page reloads, the second jump menu populates correctly, but the first jump menu resets to the first list option which is, Select Make. What do I need to do so that my selection stays after the page reloads?

here is the code for the first jump menu.

<select name=&quot;Make&quot; onChange=&quot;MM_jumpMenu('self',this,0)&quot;>
<option selected value=&quot;Condition&quot;>Choose Make</option>
<%
While (NOT rsMakeType.EOF)
%>
<option value=&quot;template.asp?Condition=<%=(rsPartType.Fields.Item(&quot;MakeType&quot;).Value)%>&quot;><%=(rsPartType.Fields.Item(&quot;MakeType&quot;).Value)%></option>
<%
rsMakeType.MoveNext()
Wend
If (rsMakeType.CursorType > 0) Then
rsMakeType.MoveFirst
Else
rsMakeType.Requery
End If
%>
</select>

Thanks Guys,
Jovix
 
Try replacing your option tag with something like this
Code:
<option value=&quot;template.asp?Condition=<%=(rsPartType.Fields.Item(&quot;MakeType&quot;).Value)%>&quot;<%If request.querystring/form(&quot;condition&quot; = rsPartType.Fields.Item(&quot;MakeType&quot;).Value The Response.write &quot;selected&quot;%>><%=(rsPartType.Fields.Item(&quot;MakeType&quot;).Value)%></option>

Cheech

[Peace][Pipe]
 
Thanks for the reply Cheech, but everytime I add you're line of code the page connat be displayed. I get this on the browser...

&quot;The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.&quot;

I remove the code, and the page loads fine again, any ideas?

Jovix
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top