[Solved] - jQuery help with checkboxes
Posted: Wed Jun 17, 2009 12:05 pm
I don't have the slightest clue how to create this.
I have a group of checkboxes in a form. When the user submits the form, a message should be displayed based on the checkboxes selected.
Assuming the orange box is checked, the message should say:
I have a group of checkboxes in a form. When the user submits the form, a message should be displayed based on the checkboxes selected.
Code: Select all
<input type="checkbox" name="one" value="1" id="one" rel="orange" /> <label for="one">Orange</label>
<input type="checkbox" name="two" value="1" id="two" rel="apple" /> <label for="two">Apple</label>
<input type="checkbox" name="three" value="1" id="three" rel="pear" /> <label for="three">Pear</label>
Assuming the orange and apple boxes are checked, the message should say:You have selected the Orange fruit.
Assuming the orange, apple and pear boxes are checked, the message should say:You have selected the Orange and Apple fruits.
You have selected the Orange, Apple and Pear fruits.