JavascriptToolbox.com Now Available!

Almost all of my javascript code has been moved over to its new home at The Javascript Toolbox. Please go there to find the latest scripts, information, etc. These pages will remain here for a while for historical purposes in case anyone needs a production copy of old code.
CheckBoxGroup
[Javascript Toolbox]  [Example]  [Source]
Description:
This library lets you quickly and easily make multiple checkboxes behave as a group by limiting the total number of boxes that can be checked and/or have a master control checkbox.
Example 1:
This example shows a checkbox group where the user can select a limited number of options.
Clicking on any option automatically checks the control box, indicating at least one is selected.
Boxes are added to the group by using a wildcard name of "color*".

Yes, I would like to receive a new car. My two color choices are:
      Red
      Blue
      Green
      Yellow


Example 2:
This example shows a checkbox group with a master checkbox which selects all other boxes in the group.
In this example, all the checkboxes have the same name, but different values.

I would like to offer my services on the following days:
      All
      Monday
      Tuesday
      Wednesday
      Thursday
      Friday
      Saturday
      Sunday


Example 3:
This example shows a simple set of checkboxes with no control box, but you are limited to picking 2 choices.

Select your two favorite colors:
Red
Green
Blue
Black
White


Example 4:
Example with 1 control box and 1 child box, for testing purposes.

Control
   Child


Example 5:
Example with some boxes checked, for further testing...

Control
   Child 1
   Child 2
   Child 3
   Child 4