Hello
how the disabled function of special option from select switch off a fieldset??
Thanks
how the disabled function of special option from select switch off a fieldset??
Code:
<script type="text/javascript">
function choose_a()
{
var x= document.getElementsByName("level").selectedIndex;
if (x == document.getElementById("1"))
{
document.l.E[0].disabled=true;
document.l.E[1].disabled=true;
document.l.E[2].disabled=true;
document.l.S[0].disabled=true;
document.l.S[1].disabled=true;
document.l.S[2].disabled=true;document.l.S[3].disabled=true;
document.l.S[4].disabled=true;
document.l.S[5].disabled=true;
document.l.S[6].disabled=true;
document.l.S[7].disabled=true;
document.l.S[8].disabled=true;
}
}
else
if (x == document.getElementById("2"))
{
document.l.k.disabled="true";document.l.se.disabled="true";
}
else
if (x == document.getElementById("3"))
{
document.l.k.disabled="true";document.l.el.disabled="true";
}
}
</script>
</head>
<body>
<form method="post" action="" name=L>
<table border="1" align="center"><Caption><h1>Registratiopn New Year</h1></caption>
<tbody>
<tr><td colspan="2" align=center>Level</td>
</tr>
<tr>
<td colspan=2 align=center><select name="level">
<option selected id="1" onClick=choose_a();>
Kinder Garden
</option>
<option id="2" onClick=choose_a();>
Elementary
</option>
<option id="3"onClick=choose_a();>
Secondary
</option>
</select></td>
</tr>
Comment