Drop down list 2 with changing values acc. to drop down list 1
I don't know whether it is possible but in an ideal world I would like to do the following:
Select a departure point A, B, C, D from a drop down list 1 (so far, so good, I can do that!)
If departure point is A or B only show arrival points 5, 6, 7 and 8 in drop down box 2.
If departure point is C or D only show arrival points 1, 2, 3, 4 in drop down box 2.
Somehow these values should be in my html form but I presume there should be some javascript function called, once the first selection is made in drop down box 1??
Basically you have javascript run a function, onchange (the select box) it checks a javascript array and replaces the values of that box with the array values.. Since I'm sure you aren't too well versed just search on google "javascript dynamic select box" or if you use jquery/ajax.. Try looking at this
Bookmarks