Hi,
I am trying to use javascript, div tag and radio button to
disable/enable a text box. It works fine
in netscape and firefox, but in IE, the text box is not disabled when
the user checks the radio button.
Note that I am using two div statements. Any other solutions also
wellcome.
<html>
<title>Test</title>
<head>
<script type="text/javascript">
function checkButton(rNa me) {
collection = document.all[rName];
if (collection[1].checked)
{
//document.myform .abutton.disabl ed = true;
document.getEle mentById("durfi xed").style.dis play="block";
document.getEle mentById("nodur fixed").style.d isplay="none";
}
else
{
document.getEle mentById("durfi xed").style.dis play="none";
document.getEle mentById("nodur fixed").style.d isplay="block";
}
}
</script>
</head>
<body >
<h2>Radio Button Check</h2>
<form name=myform>
<fieldset style="width:10 0px">
<legend>Toggl e</legend>
<INPUT type=radio name=milestone value="Beta1"
onChange="check Button('milesto ne')">Beta 1<br>
<INPUT type=radio name=milestone checked value="Beta2"
onChange="check Button('milesto ne')">Beta 2<br>
</fieldset>
<br>
<div id="durfixed" style="display: block;" >
<input type=text name=ename value="">
</div>
<div id="nodurfixed " style="display: none;" >
<input type=text name=noename readonly value="" style="backgrou nd:
#cccccc" >
</div>
</body>
</form>
</html>
Thanks for the help
Siva