View Single Post
  #4 (permalink)  
Old 11-13-09, 10:53 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Here some corrected code:

HTML Code:
<html>
<head>

<script type="text/javascript">

function update(val) {
	if (val==1) {
		document.getElementById("x1").disabled = true;
		document.getElementById("x2").disabled = true;
	}else{
		document.getElementById("x1").disabled = false;
		document.getElementById("x2").disabled = false;
	}
}
</script>
</head>
<body>

<form>
<input type="radio" name="myRadioButton" id="r1" value="1" onclick="update(1);" />Disable
<br>
<input type="radio" name="myRadioButton" id="r2" value="2" onclick="update(2);" />Enable
<p>

<input type="checkbox" name="myCheckBox1" id="x1" value="a" />Checkbox #1 
<br>
<input type="checkbox" name="myCheckBox1" id="x2" value="b" />Checkbox #2
</form>
</body>
</html>
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]

Last edited by End User; 11-13-09 at 10:55 AM.
Reply With Quote