View Full Version : dynamic select boxes

08-10-2005, 06:54 PM
I need to have 3 select boxes on a page.
Pulling info from a database but once someone selects something in the first box -- it then queries the second box based on the first and then the same for the third.

What's the best method to do this?

08-10-2005, 07:19 PM
I assume this is while the client is using it, so probably something client side like Javascript. You populate the forms with the ASP, then Javascript would tell it which to display.


If you want to just use ASP, you would need to submit each select box, which would be really annoying to the client.

08-10-2005, 07:20 PM
yes but it's dynamic as it queries the database differently based on the first checkbox.

08-10-2005, 07:22 PM
Well, the problem with that is that you have to keep calling the db, which requires a refresh of the page to submit form info. However, if you just dump all your information that could be displayed in the page into some javascript functions, you could change the other text boxes based on what is in your database.

08-10-2005, 08:19 PM
I think you're looking for the same thing as this thread:

Good luck

08-11-2005, 01:14 AM
Perhaps this may hopefully give you some ideas. It's got a downloadable sample with 2 listboxes but the same principle could be applied to add a third and does retain values after the post back (although it is admittedly somewhat complicated):

Classic ASP Design Tips - Dependent Listboxes