[thelist] Drop down menus using ASP

aardvark roselli at earthlink.net
Wed Feb 14 21:12:15 CST 2001

you're really talking about two different things... ASP runs *only* on 
the server, so you'd have to have the data in the page already, 
using JavaScript to pull the values out of an array for the second 
menu depending on what was chosen in the first menu...

the other option is to submit the form, and then let ASP populate 
the second menu based on what was entered in the first menu...

there is JavaScript out there that will do what it is you want... can't 
remember URLs right now, so i'd suggest you check the archives... 
oh, wait... check out this defunct page at my own site, look in the 
top frame:

> From: Asif Suria <asifsuria at yahoo.com>
> Does anyone have any ideas about how I can populate
> the elements of a drop down menu from a database based
> on the value selected in an other drop down menu?
> To clarify further, I have two drop down menus in my
> web page. One of these drop down menus is populated
> with "department" names from a database table called
> departments. When the user selects a department from
> this drop down menu, I want to populate my other drop
> down menu with names pertaining to that "department"
> that the user selected. 
> The SQL statement to populate the second menu would
> look something like this: 
> SELECT '<OPTION Value=''',names,'''>',names, " & _
> "'</OPTION>' FROM studentNames where " &_
> department='valueSelectedFromFirstMenu'"

More information about the thelist mailing list