1
I have nine checkboxes on my page.
<input id="chkCamp1" type="checkbox" style="margin-left: -25px" onclick="showMe('optCamp1', this)">
<input id="chkCamp2" type="checkbox" style="margin-left: -25px" onclick="showMe('optCamp2', this)">
<input id="chkCamp3" type="checkbox" style="margin-left: -25px" onclick="showMe('optCamp3', this)">
<input id="chkCamp4" type="checkbox" style="margin-left: -25px" onclick="showMe('optCamp4', this)">
<input id="chkCamp5" type="checkbox" style="margin-left: -25px" onclick="showMe('optCamp5', this)">
<input id="chkCamp6" type="checkbox" style="margin-left: -25px" onclick="showMe('optCamp6', this)">
<input id="chkCamp7" type="checkbox" style="margin-left: -25px" onclick="showMe('optCamp7', this)">
<input id="chkCamp8" type="checkbox" style="margin-left: -25px" onclick="showMe('optCamp8', this)">
<input id="chkCamp9" type="checkbox" style="margin-left: -25px" onclick="showMe('optCamp9', this)">
As with radiobuttons, I would like to do the following: when a checkbox is selected, the other nine are deselected. What’s the best way to do it?
Check/Deselect Checkbox from a button despite the title, is done with checkbox
– rray
Why don’t you use radio button ? they already work like this
– Gabriel Rodrigues
Gustavo if there are still doubts after you have marked the answer as accepted ask a new question.
– Sergio