Hi,
I have a form on a webpage that asks the user 15 questions, and for each question, the user can select one of three answers from a radio group: “Yes”, “Unsure” or “No”.
The code looks something like this:
[code=html]
<p>The purpose of the program was made clear to me before I started.</p>
Yes: <input name=”1″ type=”radio” value=”Y” />
Unsure: <input name=”1″ type=”radio” value=”U” />
No: <input name=”1″ type=”radio” value=”N” />
<p>The program was user-friendly.</p>
Yes: <input name=”2″ type=”radio” value=”Y” />
Unsure: <input name=”2″ type=”radio” value=”U” />
No: <input name=”2″ type=”radio” value=”N” />
<p>All buttons and links in the program worked.</p>
Yes: <input name=”3″ type=”radio” value=”Y” />
Unsure: <input name=”3″ type=”radio” value=”U” />
No: <input name=”3″ type=”radio” value=”N” />
.. etc etc, for 15 different questions.
What I would like to do is add a bit of JQuery that will be able to detect when a radio box is clicked, and then do something with both the [U]name[U]value
What’s the best way to do this?
Please note, I can add unique classes to each radio group if need be.
Thanks in advance.