I've had a look around multiple websites regarding drop downs and alot of the code I have come across has varied in "syntax" and structure greatly so I have been somewhat confused.
I am sort of a newbie when it comes to webdesign but I've recently began designing a website for a game guild I started and will be adding a application form that posts into our forums (all sorted).
What I aim to do, is when someone selects a Class (such as a warrior, mage, rogue in warcraft) from a drop down list, another drop down list straight below it will have it's options changed.
For non-star wars geeks, I have a drop down with four classes. Jedi Knight, Jedi Consular, Trooper and Smuggler. When someone selects Jedi Knight for example, I want the drop down list below to change the options within based on this selection.
I have tried my hand at creating a JQuery script but alas, I am a newbie at this. I learnt of it a couple of days ago and have tried my hardest to learn what I can. I saw on websites that JQuery is the way to go for this, so hopefully someone can help.
DDL1: Which class do you wish to apply as? [Jedi Knight] DDL2: Which Role for this class do you wish to play as? [Guardian or Sentinel]
So as you can see, if someone selects a class, the role DDL with change to show the two roles that reflect that class. Roles being a specialization of a class.
The HTML I have written for these two selects are:
On another note, for some reason when I try submitting the form, the form no longer submits properly.
The form submits to a forum rather than through email and has worked so far, but once I introduced this script, it stopped working thus no forum post.
The only thing that changed on the on submit script was an input name for the select this code works for, to set a variable, and ofc this jquery code that is linked into the form page.
I am wondering if this is because the "select" doesn't have set answers but since you can choose different responses and it did work, so it must possibly be the jquery itself and the select response it somehow breaking the code.
Every heard of this problem or how to combat it?
Leave a comment on magnacarta11's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic