- Moderator
- #1
OK, here's my "dilemma dujour"....
I have loaded an array with names of checkboxes on a form. I want to see if ANY of these checkboxes are checked. i.e.
var aryTest = new Array("C1","C2","C3")
var flgChecked = 0
for(i=0;i<=aryTest;i++){
// the line I'm having a problem with.... something like
if(document.forms['form1'].elements[aryTest].checked==true){
... etc...
... obviously, I can't nest the [['s together. I've verified that the NAMES of the checkboxes are in there.... my form is simply:
<FORM name="form1">
<input type="checkbox" name="C1">bla bla<br>
<input type="checkbox" name="C2">bla bla<br>
... etc.
Any thoughts on this one?
Just my 2¢
"In order to start solving a problem, one must first identify its owner." --Me
--Greg
I have loaded an array with names of checkboxes on a form. I want to see if ANY of these checkboxes are checked. i.e.
var aryTest = new Array("C1","C2","C3")
var flgChecked = 0
for(i=0;i<=aryTest;i++){
// the line I'm having a problem with.... something like
if(document.forms['form1'].elements[aryTest].checked==true){
... etc...
... obviously, I can't nest the [['s together. I've verified that the NAMES of the checkboxes are in there.... my form is simply:
<FORM name="form1">
<input type="checkbox" name="C1">bla bla<br>
<input type="checkbox" name="C2">bla bla<br>
... etc.
Any thoughts on this one?
Just my 2¢
"In order to start solving a problem, one must first identify its owner." --Me
--Greg