I have a table in a database and I would like to populate a dropdown menu along with some fields from this table. When the user selects an option from the drop down menu I want the description to change as well.
I have dynamically populated the drop down menu but I am having difficulty in having the corresponding description change.
<select name="date" id="date">
<% DO WHILE NOT objRS.EOF %>
<option onchange="<% Response.Write objRS("id") %>" value="<% Response.Write objRS("date") %>"><% Response.Write objRS("date") %><input name="id" type="hidden" value="<% Response.Write objRS("id") %>" /></option>
Also I'm not sure how to update the information when an option is selected from the drop down menu without having to submit the from?
Hope some one can help!
how do I retrieve the description based on the what is selected from the drop down list?
I can search in a database if I had to submit the form and retrieve information but I have never used a drop down list so would like some assistance.
many thanks again...
A form just posts the values from the fields it contains -including dropdowns - to a script. In the script you retrieve that posted value into a variable which you then use in a SQL statement WHERE clause. But it's still not clear what you are trying to do. If you are populating the dropdown from the database, then you can get the description at that time. Where are you trying to display the description?
I have two columns in my table, date and venue. The dates are listed in the drop down list. When I select a date I also want the corresponding venue to appear too... I'm having trouble showing this.
I have populated the dynamic drop down list. Im struggling with the next bit.....
Europe, Middle East and Africa