<select> tag and submit

Hi there,

I’d like to add a simple feature to my site were a user has to select the right answer from a list.

The code I’m using so far:

<select>
    <option>Select answer</option>
    <option>a</option>
    <option>b</option>
    <option>c</option>
    <option>d</option>
</select>
		<input associd="feedback" class="faderIn btn-multiple-choice" id="btnFeedbackRight"  type="button" value="Submit" /> 

Obviously the code doesn’t do anything once the submit button has been pressed. What do I need to do to make it say “Correct” if say B has been selected?

Thanks for any help.

You need to embed it between <form> tags and assign a method as post or get otherwise the whole thing is essentially just a fancy clickable graphic. See here.

I’ve wrapped the form tags around the question. Would there be a simple way than a method? Such as a simple javascript function saying b is correct, a,c,d are wrong?

Just set javascript function with flags…it will work…

Well, do you want it to be automatic message, or let the page reload and do something?

If the former, JS, if latter, PHP or some other server side language.