Your three checkboxes named 'yep' all have onclick="toggleRadios()". If you look in that function, it only says to set the display property of the div with the id of radiobuttons to a value of 'none' and only if it is already set to nothing. If you want the function to actually toggle, it needs to say:
Code:
function toggleRadios(){
if(radioDiv.style.display == "")
radioDiv.style.display = "none";
else
radioDiv.style.display = "";
}
That still will not guarentee that the checked state of the checkbox wil have anything to do with it.
I'd leave the function the way it is, use only one yep checkbox and do something like this:
HTML Code:
<input type="checkbox" name="yep" onclick="if (this.checked){toggleonRadios()}else{toggleRadios()}">check
But, for that to work, fix the toggleonRadios function:
Code:
function toggleonRadios(){
if(radioDiv.style.display = "none"){
radioDiv.style.display = "";
}
}
Bookmarks