ibjdt
Programmer
- Nov 25, 2002
- 63
i have a form with 10 checkboxes
i have a validation where if checkbox 10 is checked, extra info is displayed versus when it is not checked
this works great if checkbox 10 is checked, but i get an error if 10 isn't checked and the js doesn't complete.
any ideas?
thanks.
Code:
<INPUT type="checkbox" value=1>.....
<INPUT type="checkbox" value=10>
i have a validation where if checkbox 10 is checked, extra info is displayed versus when it is not checked
Code:
for (i=0;i<totalOptions;i++) {
if (document.myForm5.elements[i].checked == true) {
isChecked = true;
count++;
}
}
if (document.myForm5.elements[10].checked == true) {
extrainfo
}
if (isChecked) {
codetoshowalways
}
this works great if checkbox 10 is checked, but i get an error if 10 isn't checked and the js doesn't complete.
any ideas?
thanks.