Jump to content

Populating drop down menus


mtgriffiths

Recommended Posts

Hi All,

 

I have 2 drop down menus in my form. The first drop down menu will allow the user to select the football league. The second will be to select the teams in that football league.

 

There are 3 football leagues each with 6 teams. I would like to have it so that when league 1 is selected from the first drop down menu only the teams in league 1 are show....if league 2 selected teams from league 2 are shown.

 

Is this possible? If so could anybody help?

 

Thanks in advance

 

Matthew

Link to comment
Share on other sites

You could either do this using javascript...

or you can do it by using $_POST information.

 

if you use javascript...

When you click on something in the fist drop down, a second drop down box will appear to the right with all the teams from that certain league.

 

if you use $_POST...

When the person selects a league, you can make it so that they have to submit just that information. Then you can use php to create a select box with the teams in it.

 

Both methods are equally "hard" (well not for some ppl) however i would recommend the javascript method (using ajax)

 

reply if u need any help or what method you would like to use...

Link to comment
Share on other sites

Okay im just gunna make a quick tutorial on this page (personally i find the FAQ tutorials too hard to understand plus they use complicated methods when it could just be sooo simple!)

 

one second im just gunna go onto my other computer and make the tutorial =D

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.