Link to home
Start Free TrialLog in
Avatar of cclausen1
cclausen1Flag for United States of America

asked on

I need to add vb code that will add a new drop down list on a link / button click

I have an asp website where I have a drop down box which is connected to a sql database. All the options displayed in drop down are the records from the database. The problem is you can't have multiple options in a drop drop box which we really need here. I want to create a button or link (next to drop down box) which will add another drop down and let the user pick another option from the same database and will keep adding a drop down box until the user is done selecting items. Any thoughts on what code to use and how? I am using VB Studio 2005 for this!
Avatar of Yiogi
Yiogi

are you using nested drop downs and the next one depends on the value of the previous ones? That's what I understand. And even though you ask for VB code I hate to tell you that the best way (and the only way I know) is via Javascript.

Here is an example of a nested combo whose values change once you select something to the next option you should select:
http://www.javascriptkit.com/script/script2/2levelcombo.shtml

Here is an example of multiple combo boxes where the values of the next combo that gets enabled depend on the values of the previous. Basically its simple filtering of the data.
http://www.javascriptkit.com/script/script2/multiplecombo.shtml
Avatar of cclausen1

ASKER

Javascript should be fine but I am actually looking for something which will let me select more than one record from the same table.

Example:

Table A has different records like IN, IL, CA, MA, AZ etc.. If the user selects IL and then he also want to select IN, what would be the best way to approach it?
ASKER CERTIFIED SOLUTION
Avatar of Yiogi
Yiogi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial