[thelist] Drop down menus using ASP

Asif Suria asifsuria at yahoo.com
Wed Feb 14 20:46:15 CST 2001


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'" 


Thanks,
Asif

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/




More information about the thelist mailing list