I am trying to create a script that turns off the 'disabled' attribute in a set of radio buttons when another radio button elsewhere is clicked.
To see this code in context find the disabled radio buttons on this page:
To see this code in context find the disabled radio buttons on this page:
Code:
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!--
Function EnableDots(MonthlyOption) {
If (MonthlyOption.checked) {
for (i=0; i<document.AddEvent.D.length; i++) {
document.AddEvent.D[i].disabled = false
}
document.AddEvent.D[i].disabled = true
}
//-->
</SCRIPT>
.....
<label for="Monthly">
-- <input type="radio" name="RepID" value="2" id="Monthly" OnClick="EnableDots(this);">
every month on<br>
</label>
<table width="400" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="10"> </td>
<td width="382">
<label for="emonth1"><input id="emonth1" type="radio" name="D" value="1" DISABLED>
The first of every month</label> </td>
</tr>
<tr>
<td width="10"> </td>
<td width="382">
<label for="emonth2"><input id="emonth2" type="radio" name="D" value="2" DISABLED>
The second of every month</label> </td>
</tr>
<tr>
<td width="10"> </td>
<td width="382">
<label for="emonth3"><input id="emonth3" type="radio" name="D" value="3" DISABLED>
The third of every month</label></td>
</tr>
<tr>
<td width="10"> </td>
<td width="382">
<label for="emonth4"><input id="emonth4" type="radio" name="D" value="4" DISABLED>
The fourth of every month</label></td>
</tr>
<tr>
<td width="10"> </td>
<td width="382">
<label for="emonth5"><input id="emonth5" type="radio" name="D" value="5" DISABLED>
The fifth of every month</label></td>
</tr>
<tr>
<td width="10"> </td>
<td width="382">
<label for="emonth0"><input id="emonth0" type="radio" name="D" value="0" DISABLED>
The of every month</label></td>
</tr>
</table>