I need to write a javascript function with onClick() for the radio button or checkbox. I have a situation in which :
1. I should be able to select select a group of radiobuttons if their parent radio button is selected
2. I should be able to select a single radio button from only one group.
Example:
<input type="radiobutton" name="parentA"> ...
<input type="radiobutton" name="childA1"> ...
<input type="radiobutton" name="childA2"> ...
<input type="radiobutton" name="parentB"> ...
<input type="radiobutton" name="childB1"> ...
<input type="radiobutton" name="childB2"> ...
<input type="radiobutton" name="childB3"> ...
...
If the radiobutton corresponding to "parentA" is clicked then all "childA1", "childA2" should be selected.
If user has selected "childA1" and then if he clicks "childB1", then "childA1" has to deselected and "childB1" has to selected.
Can any one help me in this regard?
Thanks in advance
Navanee