Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<script type="text/javascript">
function checkI()
{
var checkL = document.getElementsByName('form[PetsInHouse][]');
for (var i=0;i<checkL.length-1;i++)
if(document.getElementById('PetsInHouse3').checked){
document.getElementById('PetsInHouse'+i).disabled = true;
document.getElementById('PetsInHouse'+i).checked = false;
}
else {
document.getElementById('PetsInHouse'+i).disabled = false;
}
}
</script></head>
<body>
<div class="formCaption2">Which of the following pets do you have? Check all that apply.<strong class="formRequired">*</strong></div>
<div class="formBody"><input name="form[PetsInHouse][]" type="checkbox" value="Dog" id="PetsInHouse0" onclick="checkI();" /><label for="PetsInHouse0">Dog</label><br/><input name="form[PetsInHouse][]" type="checkbox" value="Cat" id="PetsInHouse1" onclick="checkI();" /><label for="PetsInHouse1">Cat</label><br/><input name="form[PetsInHouse][]" type="checkbox" value="Other" id="PetsInHouse2" onclick="checkI();" /><label for="PetsInHouse2">Other</label><br/><input name="form[PetsInHouse][]" type="checkbox" value="None" id="PetsInHouse3" onclick="checkI();" /><label for="PetsInHouse3">None</label><br/><span class="formClr"><span id="component52" class="formNoError">Invalid Input</span></span></div>
</body>
</html>
Bookmarks