golffinder Posted May 27, 2009 Share Posted May 27, 2009 Hi would nayone know how to do the following with ajax? I'm completely stuck, what i'm trying to do is create some drop down boxes which pull info from the db , then when someone chooses "Europe" from the first box, it automatically only shows europe countries in the second box, then when they choose the european country in second box all course in that country appear in 3rd box. also there is one other complication in that, if someone chooses "north america" in first box, in second box all north america countries appear, if they choose USA, i then want another box to appear with the "States" in it, then when state choosen , the courses for that state appear, the data is kept in 3 different tables, i have so far 3 boxes pulling in "continent" "countries" & "courses" can anyone help me get this up and running? i can post here what i have if any help p.s i'm pretty new to all this and not very good Quote Link to comment Share on other sites More sharing options...
Axeia Posted May 27, 2009 Share Posted May 27, 2009 Please do post what you have as instead of working abstractly we can use the same names / get a better idea of what's supposed to happen, and do you already have an existing javascript framework (with ajax capabilities) in place such as jquery? Quote Link to comment Share on other sites More sharing options...
ronverdonk Posted May 29, 2009 Share Posted May 29, 2009 Since you have already made 3 drop-down boxes, I do not see why you cannot insert a 4th one or, in your case, 1 'US state' box in-between 'countries' and 'cities'. Assuming you have one server routine that handles your requests, also that you pass the identifier of the <div> into which you save the result code to the JS routine. When you use "float:left" for these divs, all drop-downs will align nicely next to each other. If this is not the case, please show the code you have developed so far. Ronald Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.