Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - I need help, with maintaining the selected name in
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

I need help, with maintaining the selected name in

 Post Reply Post Reply
Author
Bebopgeo View Drop Down
Newbie
Newbie


Joined: 29 May 2007
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bebopgeo Quote  Post ReplyReply Direct Link To This Post Topic: I need help, with maintaining the selected name in
    Posted: 10 July 2007 at 8:25pm
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.
Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2007 at 6:00pm
easiest way is to add a name/value pair on to the querystring when the form submits...
 
mypage.asp?selectedItem=2
 
and then you can read the name/value pair from the URL, save it as a variable, and dynamically select the item based on the variable value.


Edited by KCWebMonkey - 11 July 2007 at 6:02pm
Back to Top
Bebopgeo View Drop Down
Newbie
Newbie


Joined: 29 May 2007
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bebopgeo Quote  Post ReplyReply Direct Link To This Post Posted: 13 July 2007 at 6:23pm
Well I,m a beginner, and I didn't get it yet. So more detail would be go. 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". 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.
 
<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>


Edited by Bebopgeo - 15 July 2007 at 3:11pm
Back to Top
Bebopgeo View Drop Down
Newbie
Newbie


Joined: 29 May 2007
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bebopgeo Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2007 at 7:04pm
Here it is and it works
<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>
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.