When radio buttons are created, we give them all the same name. These now are a group, and must be accessed using array notation. To detect which one has been selected we need to loop through them all, asking each one whether or not it has been chosen:
[color blue]
function getValue(Obj_checkBoxGroup){
[/color]
Send the function the group to work with like:[color red]
<form>
...
<input type="button" onClick="getValue(names)">
<input type="checkbox" name="names" value="Gus">
<input type="checkbox" name="names" value="Tony">
...
</form>
[/color]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.