PDA

Click to See Complete Forum and Search --> : Dynamic List Box in ASP


sodhichd
Apr 5th, 2001, 04:02 PM
I have two combo boxes. The first one has fixed data values but depending on what is selected from the first combo box I have to pick values from SQL Server and show in the second box.

Basically I want to know if we can delete and add values to a combo box through java script.

Thanks.

monte96
Apr 5th, 2001, 05:25 PM
It is easy to do (once you know how to do it).

You will need to use server side code to populate client side arrays when the page first loads with all records that 'could' be put into the second combo box and make sure you have a key field that links the array member to the value (key) from the first combo box.

Another, method with less coding is to refresh the page on change from the 1st combo box and simply load the recordset with the new data.