Drop down list not retaining selected value

J

JDoak

I have a drop down list item that is populated by a
database and once selected repopulates a table with
information related to the list item.

The problem is that when a user selects a list item, the
list item refers back to the first item in the list. I'm a
bit new at this.... I really need some help.
 
G

grw

Modify your code so that each select "option" refers to the selected value

<select name="dropdown">
<option value="1" <%If request.form("dropdown")="1" then response.write "
selected"%>> Option 1</option>
<option value="2" <%If request.form("dropdown")="2" then response.write "
selected"%>> Option 2</option>
<option value="3" <%If request.form("dropdown")="3" then response.write "
selected"%>> Option 3</option>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top