Hello Everyone, we get a javaScript error:
rnsPlan.10 is null or not an object
Heres my code, what do you think happened, and why 10 and not 11? Is it coming from the enableOther1(); function
<script>
window.onload = main;
function main(){
enableOther1();
enableOther();
}
function enableOther(){
//Enable question 5C Other if it's checked
if(document.save50P1.rdoIn
vPlan[5].c
hecked){
document.save50P1.rdoInvPl
anOther.di
sabled = false;
document.save50P1.rdoInvPl
anOther.st
yle.backgr
oundColor=
"#FFFFFF";
} else {
document.save50P1.rdoInvPl
anOther.di
sabled = true;
document.save50P1.rdoInvPl
anOther.va
lue = "";
document.save50P1.rdoInvPl
anOther.st
yle.backgr
oundColor=
"#CCCCCC";
}
}
function enableOther1(){
//Enable question 5C Other if it's checked
if(document.save50P1.rdoIn
sPlan[10].
checked){
document.save50P1.rdoInsPl
anOther.di
sabled = false;
document.save50P1.rdoInsPl
anOther.st
yle.backgr
oundColor=
"#FFFFFF";
} else {
document.save50P1.rdoInsPl
anOther.di
sabled = true;
document.save50P1.rdoInsPl
anOther.va
lue = "";
document.save50P1.rdoInsPl
anOther.st
yle.backgr
oundColor=
"#CCCCCC";
}
}
</script>
<tr>
<td valign="top" align="left" width="15"></td>
<td valign="top" align="left"></td>
<td valign="top" align="left"> <table cellpadding="0" cellspacing="1" border="0" width="100%">
<tr>
<td valign="top" align="left" width="50%"> <input type="checkbox" name="rdoInvPlan" onClick = "enableOther();" value="6"<%if (Instr(rdoInvPlan,6)>0) Then %> CHECKED<% End If%> />
Other
<input style="font-family: Verdana; font-size: 8pt" type="text" size = "25" value="<%=rdoInvPlanOther%
>" name="rdoInvPlanOther" disabled />
</td>
</tr>
</table></td>
</tr>
</tr>
<tr>
<td valign="top" align="left" width="50%"> <input type="checkbox" name="rdoInvPlan" value="11" onClick = "enableOther1();" <%if (Instr(rdoInvPlan,11)>0) Then %> CHECKED<% End If%> />
Other
<input style="font-family: Verdana; font-size: 8pt" type="text" size = "25" value="<%=rdoInsPlanOther%
>" name="rdoInsPlanOther" disabled />
</td>
</tr>
Start Free Trial