That's:
var checkedpos=-1;
for (var i=0; i < 3; i++) {
if (document.form1.choice[i].checked) {
checkedpos = i;
break;
}
}
if (checkedpos == -1)
alert("Please check a thingy");
Sorry, I hate this TGML stuff...its very bad for program code, especially when I like to use "i"...
Do a for loop:
var checkedpos=-1;
for (var i=0; i < 3; i++) {
if (document.form1.choice[i].checked) {
checkedpos = i;
break;
}
}
if (checkedpos == -1)
alert("Please check a thingy");
Okay, I am really having problems with this. The subject is the error I get when running the following function. I have found that it actually does recognize "bigarray[parseInt(tope[ i ])].split(',')[0]", because I have document.writen it. The problem seems to be += the string...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.