php - Drop down selections based on Previous selection -


I have a little question that I am running an event and some of its cities, different dates and different times. I am creating a signup form in jQuery / PHP / HTML I want to show options to appear based on the previous selection.

I have 3 cities on "City 1" "City 2" "City 3"

and "City 1" "July 22 "& Amp; "25 July"

and "22 July" have 2 sessions "2pm" & amp; "5 AM"

How can I get started with a form like this? Please give me an example.

Thanks pile people

Do not do this for you, but I'll give you something First of all, your selection requires an on-line function, and they require each unique ID eg

  & lt; Onchange = 'update' id = 'box1' & gt; Choose   

Next, your onchange function needs to detect the current element and update other boxes. I suggest collecting data as a multi-dimensional array, so the update will be something like this:

  var id = this.options [this.selectedIndex] .value; Var b2 = document.getElementById ('box2'); While (b2.options.length & gt; 0) b2.remove (0); // Remove all the currently present options (Boxopation [id] in var i) b2.pop [b2.options.length] = new option (box option [id] ['name'], box option [id] [' value']); // Add new options   

And, of course, you will need an array of data, but you can understand yourself comfortably this help?

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

asp.net - MVC [HandleError] HandleErrorAttribute called twice when using global logging -