Retrieving Drop down menu value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Parz
    New Member
    • Nov 2006
    • 8

    Retrieving Drop down menu value

    Hi am facing problem in retrieving the value selected from drop down menu in one page from the next page..Am using the following code to populate the drop down menu with values form the database.

    <td width="169" >
    <select id="states" name="states" style="display: " >
    <%
    while not rsstate.eof %>
    <option value="<%=rssta te("state")%>"> <%=rsstate("sta te")%></option>
    <%rsstate.MoveN ext
    wend
    rsstate.Close

    On submit when i try to retrieve the value using
    request(states) ..in the next page
    It doesnt give me any value..
    Can anybody please help me..
  • nedu
    New Member
    • Nov 2006
    • 65

    #2
    Hi,

    Try it now . . ..

    states = request("states ")

    Enter the dropdown list name in doublequotes ""

    If u have any queries mail me at mneduu@gmail.co m
    Thanks & Regards

    (M. Nedu)

    Comment

    • dswethar
      New Member
      • Nov 2006
      • 65

      #3
      Also, its a good practise to use Request.Form("s tates") (If you have a form)

      Comment

      Working...