View Full Version : Display alternate recordset

09-09-2005, 07:50 PM
Table: FRUIT

I like apples.
I like bananas.
I like grapes.

I'm trying to have it where the choices from column1 are provided on the form, and based on the what was chosen on the form the corresponding choices from column2 are display on the page.

09-09-2005, 07:57 PM
You're talking about recordsets, so I'm guessing you're pulling this info from a database? So the column1 values are put into a dropdown box and then based on what is selected, you want the DB to populate a second drop down? Are the values from column1 from the DB too, or just the second drop down?

If this isn't pulling from a DB, you should then refer to this topic in the JS forum: http://codingforums.com/showthread.php?t=67806


09-09-2005, 08:21 PM
You described perfectly what I am trying to do...and yes both columns are from the database. So the link u provided does not help.

Thanks for reply.

09-09-2005, 08:48 PM
Well, you should still refer to the link I posted. because NikkiH supplies a link in the first reply that would be useful. That link shows a little tutorial that combines Javascript and PHP. Well, you just replace the PHP code with ASP code and there you go! That method provides a way without reloading the page.

The other way to do it is that you have the first drop down grab the data from the table. Then for the onChange event of that drop down, have it submit the the form. The forms action should be left blank so that it submits to itself. This way, you'd stay on the same page and the second drop down could be populated by what is selected in the first drop down.


09-14-2005, 04:54 AM
Possibly somewhat related link requires that the page post back to itself:

Classic ASP Design Tips - Dependent Listboxes