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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically changing contents of a drop down menu from another menu

Status
Not open for further replies.

outonalimb

Technical User
Joined
Oct 7, 2003
Messages
454
Location
GB
On most flight web sites nowadays, they have a drop down menu where you can choose your departure airport. Once you have chosen this, another drop down menu will automatically show you only the destination airports that the departure airport serves.

I would like to do something very similar to this on our Company intranet but have no idea where to start. Could someone please point me in right direction?

For example, I want a drop down list of branches and once one is selected, another drop down list will show the facilities that only this branch offers.

I hope someone can help...

Regards,


 
I would suggest you use AJAX to allow you to request the next "branch" of data from the server. You would trigger the AJAX request using the onchange event on the first select. Once you get the results back from the AJAX call... you can then dynamically build up a new select that contains the new branch of options. Repeat until you reach your final selection.

Those are all the buzzwords... and ought to get you started along the right google track.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top