Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop down list + values

Status
Not open for further replies.

jetsett

Technical User
Jan 22, 2004
3
GB
I am building with DreamweaverMX a site that displays information about hotels. I have come across a problem with adding hotels to the database using dynamic lists. Basically I have 3 tables called 'countrys' 'places' and 'hotels'. The 'countrys' table contains a countrys list and the 'places' table contains a places list with a second field containing its country which was populated by choosing from the 'countrys' list when the place was added. I now need to add a hotel to the database and select from a drop down list the place where it is located which in turn will automatically select the 'country' on the same row. All the data can then be inserted into the database. I cannot get the country to be selected when I choose from the place list.
Can anyone help as I am nowhere near sorting this and tried looking everywhere for help !

 
u have to use the "selected" keyword along with ASP.
e.g:
Code:
<%
vl="1"
%>
<select>
<option value="1" <%if vl="1" then%>selected<%end if%>>1</option>
<option value="2" <%if vl="2" then%>selected<%end if%>>2</option>
</select>

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top