-
<select> onChange in dynamic drop down menu
I am using a html Form to create and populate three dynamic drop down menus. They are Country - State - City. Selecting a country populates the State menu, which in turn populates the City menu once a State is selected. What is missing in this equation is a function to open a new html page of text relating to the selected City. Ergo, a few thousand html pages residing on the server that specifically relate to the cities. From what I can gather, I need some form of <select> onChange coding that will point to the appropriate html page. With some very good help, I have gotten this far, and have my three menus working, leaving me to resolve this final step. Any and all suggestions will be gratefully accepted. This is the Form coding:
<form>
<table border="0">
<tr>
<td>
<select id='countrySelect' name='country' onchange='javascript: populateState(); populateCity();'></select>
</td>
<td>
<select id='stateSelect' name='state' onchange='javascript: populateCity();'></select>
</td>
<td>
<select id='citySelect' name='city'></select>
<script type="text/javascript">initCountry('CA'); </script>
</td>
</tr>
</table>
</form>
-
-
Do you just want a redirect? You could do:
onchange="document.location='mydir/'+this.value;"
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks