You need to call the 'onchange()', or 'onblur()' of the select box. From
there you basically have two options:
1) refresh the page (making another trip to the server), passing the
selected value from dropdown box 1, to collect the necessary values from the
database to display in the seconds dropdown box, OR
2) Already have all possible values for the second dropdown box 'preloaded'
using javascript and apply them to the second dropdown box in your function
from the 'onchange()' call. This doesn't include a second trip to the
server.
SO basically it depends on how many possible values there are for the second
dropdown box and how proficient at Javascript you are. If there are only
few possible values for the second dropdown box and you can use JS then use
option 2. Otherwise go with option 1.
HTH,
Andrew
-----Original Message-----
From: Kafila.Patel@t... [mailto:Kafila.Patel@t...]
Sent: Tuesday, 18 September 2001 8:07 AM
To: Interdev_Programming
Subject: [interdev_programming] use of dropdowns
Hi,
I have a question regarding dropdowns in my asp page.
I have two dropdowns,
Dropdown1 Dropdown2 Submit
Now when I initially load this page Dropdown1 gets populated from the
database(this works fine).
The user has to select an entry from Dropdown1, for Dropdown2 to get
populated from database.
How do I achieve this?What kind of event do I use?
Any help will be great,
Thanks.
Kafila