View Single Post
Old 12-04-2008, 11:15 PM   #2 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Would this not require Ajax to change the second dropdown depending on the content of the first? So for instance, if the user selects "Bristol" from the first dropdown, should an Ajax call be made to acquire the destinations available for the chosen departure?

Take a look at Teletext Holidays and how they did it. You will notice that when you select a location to depart from, the destination list will update, displaying only those available for the previously selected departure.

The aforementioned is achieved by an Ajax call to this page, with the following POST parameters:

Code:
{"knownCategoryValues":"SearchFrom:-9;","category":"SearchGateway","stype":"Package_Holidays","departuredate":"11/12/2008"}
The response we are given is a JSON formatted response, which is then used to populate the second dropdown on-the-fly based on the first. I believe this is what you're after.

Incidentally, welcome to the community, you little devil! I hope you enjoy your stay here.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
The Following User Says Thank You to Wildhoney For This Useful Post:
worldop (12-04-2008)