kalyanraj
11-03-2006, 06:12 AM
Hi all,
Please provide an idea of how to build dynamic list boxes using Javascript.
I have 2 list boxes containing Origin and Destination of flights. If i select one Origin country then , second list box must populate only those countries which have flights.
In the http://www.ryanair.com/site/EN/ site, If I select "Aarhus" as origin and it will show only 2 countries "Barcelona" & "London". When i see the code, it has pre-assigned arrays, whenever OnClick is triggered it is calling the function and populating the array values.
But i need to populate the destinations from the database everytime i select the origin from the listbox 1. Simply saying that I can't hardcode the origin and destination arrays , as i need to get them from the database...
Any help or suggestions are appreciated...
Thanks,
Raj
Please provide an idea of how to build dynamic list boxes using Javascript.
I have 2 list boxes containing Origin and Destination of flights. If i select one Origin country then , second list box must populate only those countries which have flights.
In the http://www.ryanair.com/site/EN/ site, If I select "Aarhus" as origin and it will show only 2 countries "Barcelona" & "London". When i see the code, it has pre-assigned arrays, whenever OnClick is triggered it is calling the function and populating the array values.
But i need to populate the destinations from the database everytime i select the origin from the listbox 1. Simply saying that I can't hardcode the origin and destination arrays , as i need to get them from the database...
Any help or suggestions are appreciated...
Thanks,
Raj