I have a form that displays four radio buttons, named
If a user selects Any Three, then I want to limit the number of checkboxes (below), that can be checked to three, or if they select All Five, allow them to check all five of the checkboxes, and so on ...maybe just a pop-up warning if they select one too many, and then uncheck the last one they checked.
Here's what the checkboxes look like:
Can anyone show me some onclick javascript to handle this?
Thanks!
Code:
Any Two <input type="radio" name="prog_name" value="13"/>
Any Three <input type="radio" name="prog_name" value="14"/>
Any Four <input type="radio" name="prog_name" value="15"/>
All Five <input type="radio" name="prog_name" value="16"/>
If a user selects Any Three, then I want to limit the number of checkboxes (below), that can be checked to three, or if they select All Five, allow them to check all five of the checkboxes, and so on ...maybe just a pop-up warning if they select one too many, and then uncheck the last one they checked.
Here's what the checkboxes look like:
Code:
<input type="checkbox" name="multiprog_hbo" value="yes" />
HBO<br />
<input type="checkbox" name="multiprog_cin" value="yes" />
Cinemax<br />
<input type="checkbox" name="multiprog_sho" value="yes" />
Showtime<br />
<input type="checkbox" name="multiprog_stz" value="yes" />
Starz<br />
<input type="checkbox" name="multiprog_plb" value="yes" />
Playboy
Can anyone show me some onclick javascript to handle this?
Thanks!