Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic drop down list

Status
Not open for further replies.

Gragi

Programmer
Oct 4, 2004
59
US
Hello,
I have a table in SQL Server like
Col A - Col B
Software - Microsoft Office
Software - Dreamweaver
Software - SQL Server 2005
Hardware - Laptops
Hardware - Monitors
Hardware - USBKeys

So here I'm writing some SQLs in ASP code to get these 'Col A' and 'Col B' into 2 different drop down list boxes and works fine like 1st drop down gets Software, Hardware as items, and in the 2nd drop down get all items from the 'Col B'.

Here my requirement is when I select Software in the first drop down 2nd drop down should display only 'Microsoft Office', 'Dreamweaver', 'SQL Server 2005',
and when I select Hardware in the 1st drop down 2nd drop down should display only 'Laptops', 'Monitors', 'USBKeys'

Please I need urgent help on this...
I really appreciate your time..

Thank You,
Gragi
 
You could modify your SQL query so that it uses a WHERE clause...

Or perhaps use your ASP to write some client-side javascript array and then use add/remove itesm from your dropdowns using client-side programming.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top