drop downs from table data
Hello, I'm developing a booking system. I've got a database, with records such as( colon representing column break ):
Bristol : Newcastle
Bristol : Manchester
Manchester : Bristol
and so on, I'm trying to make drop down menu's for Departing City, and Destination City using <select><option> html. I'm getting duplicate drop-down options and im not sure how to display one of each of the departing/destination records, Also another thing I don't know how to do is, only display the corresponding Destination: e.g.
if the Departing City is Bristol, then only the destinations from Bristol should appear in the second drop-down.
Here is my code so far, if anyone could help it would be appreciated, thanks.
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:
Incidentally, welcome to the community, you little devil! :-) I hope you enjoy your stay here.
Its exactly what I'm after :) didn't know I had to use Ajax though *tutorials here i come*
Thanks, i'll update when im done
I did not have a chance to answer it:( I would have gotten that one too
|All times are GMT. The time now is 04:47 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0