I have looked for hours on the web with no luck!
I have 40 Check boxes, one check box must be checked at all times. Here’s the twist, that one check box must be any one of the 40.
I know how to target just one single button…this is not the goal. The user must be able to choose which one is to remain active.
$(document).ready(function() {
$('#W_E-helpPage01').click(function() {
return false;
As for form validation that’s not the ticket either. As this needs to be dynamic, it must prevent the user from deselecting all but one check box.
Example:
If 30 where to be check, and the user decided to uncheck all 30 he can not do this. As the rule is there must always be at-less one check, it doesn’t matter which one but it must be random.
Any help would be greatly appreciated.
Thanks,
Ricky
This code will stop the user from unchecking the last checked checkbox:
It checks to see if this click results in there being no checked check boxes and cancels the click if that is true.
http://jsfiddle.net/BQCK3/