Jump to content

conditional drop down boxes


golffinder

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/159841-conditional-drop-down-boxes/
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.