The checkBoss function addresses the recurring question: 'How can I use JavaScript to make a single check box, radio button or other control act upon a group or groups of other checkboxes (in any number of ways)?".
- Master checkboxes can be configured to act:
When checked only
When unchecked only
When checked or unchecked
Master checkboxes can act on ranges of slave checkboxes to:
Check or uncheck
Invert the checked or disabled status
Enable/disable
Reset to default checked state
It is also possible to act on just part of a range of checkboxes, and/or multiple ranges.
Radio buttons can be used as master or slave elements, the latter within the constraint of exclusive selection.
Note: In this demonstration, if target checkboxes are in the wrong initial state, some master checkboxes may appear to have no effect.
-----------Separate Form------------
Access Instructions and Source Code
This script not suitable? Tell us why.