Jump to content

I need help, with maintaining the selected name in a jump menu


Bebopgeo

Recommended Posts

I need help, with maintaining the selected name in a jump menu. I have a jump menu with four names in it. and when I select a name in the jump menu, I have it going back to the same page, and I would like it to maintain, the selected name that I have selected, and I would like to pass on a Request.querystring variable or a hidden file like a siteID when the jump menu is activated. Here is what I got so far. Form1 is a jump menu that does not have a Request.QueryString attach to it and From2 has a Request.QueryString attach to it at the Dynamic source "<%= Request.QueryString("Countryname2") %>" The jump menus are on "Test Jump page.asp". and all the names in the dropdown list go back to the same page. I can see the name and value in the URL at the top of the page. But I can't figure out how to get that to influence the name in the dropdown list. So any help woulb be good.<body><form action="" name="form1" id="form1"> <select name="Countryname1" id="Countryname1" onchange="MM_jumpMenu('parent',this,0)"> <option value="Test Jump.asp?Test1=1" selected="selected">Test1</option> <option value="Test Jump.asp?Test2=2">Test2</option> <option value="Test Jump.asp?Test3=3">Test3</option> <option value="Test Jump.asp?Test4=4">Test4</option> </select></form><form name="form2" id="form2"> <select name="Countryname2" id="Countryname2" onchange="MM_jumpMenu('parent',this,0)"> <option value="Test Jump.asp?Test5=5" <%If (Not isNull(Request.QueryString("Countryname2"))) Then If ("Test Jump.asp?Test5=5" = CStr(Request.QueryString("Countryname2"))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Test5</option> <option value="Test Jump.asp?Test6=6" <%If (Not isNull(Request.QueryString("Countryname2"))) Then If ("Test Jump.asp?Test6=6" = CStr(Request.QueryString("Countryname2"))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Test6</option> <option value="Test Jump.asp?Test7=7" <%If (Not isNull(Request.QueryString("Countryname2"))) Then If ("Test Jump.asp?Test7=7" = CStr(Request.QueryString("Countryname2"))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Test7</option> <option value="Test Jump.asp?Test8=8" <%If (Not isNull(Request.QueryString("Countryname2"))) Then If ("Test Jump.asp?Test8=8" = CStr(Request.QueryString("Countryname2"))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Test8</option> </select></form></body></html>

Link to comment
Share on other sites

Try something like this:<select name="Countryname2" id="Countryname2" onchange="MM_jumpMenu('parent',this,0)"><option value="Test Jump.asp?link=1" <%If (Not isNull(Request.QueryString("link"))) Then If ("1" = CStr(Request.QueryString("link"))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Test5</option><option value="Test Jump.asp?link=2" <%If (Not isNull(Request.QueryString("link"))) Then If ("2" = CStr(Request.QueryString("link"))) Then Response.Write("selected=""selected""") : Response.Write("")%>>Test6</option>

Link to comment
Share on other sites

The easiest way is to just add that information onto the URL that they get redirected to. If you want to add a value from another field on the page, you will have to edit the MM_jumpMenu function and add whatever is necessary into that to append another value onto the URL before it redirects.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...