Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Get new selected list entry to show in drop-down list
Old 07-27-2006, 11:41 AM Get new selected list entry to show in drop-down list
Novice Talker

Posts: 8
Trades: 0
Hi,

I am using the "select" HTML drop-down list. I wanted to know what the simplest way to have the page update with the newly selected list entry when refreshed.
Run this code below:

Code:
 
<body>
<form id="form1" name="form1" method="get" action="">
  <label>Search Radius 
  <select name="select" size="1">
    <option value="200">200 feet</option>
    <option value="500">500 feet</option>
    <option value="1000">1000 feet</option>
    <option value="2000">2000 feet</option>
    <option value="2640">1/2 a mile</option>
    <option value="5280">1 mile</option>
  </select>
  </label>
  <input type="submit" name="Submit" value="submitBut">
 <%
 if request.querystring("submit") <> "" then
   response.Write(request.QueryString("select"))
 end if
  %>
</form>
</body>
</html>
you will see that the no matter which entry in the drop-down list the user selects, the list will always refresh to the first position in the list ("200 feet").

So what is the simplest way to get the currently selected entry to appear as the selected entry? Do I have to loop through each entry in the list, check to see if it is the selected entry and if so, set it as selected, if not skip?

Or is there some method of this object that simply selects the entry who's value equals (request.QueryString("select"))?? What would be the syntax for this?

Please respond with actual code rather than vague clues. Thank you.
gfunkera is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Get new selected list entry to show in drop-down list
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.07688 seconds with 12 queries