I'm stumped and I think I've just been looking at this too long and I'm missing something simple:
I have an array of fields that I would like to update if the function is called.
The array will change - that part is working the sample I'm going to show is after the array is selected I want to update all checkboxes in that array to be checked.
var theGroup = ['typM', 'typSt', 'typSp'];
for (i=0; i < theGroup.length;i++)
{
update field to checked. Here's the problem.
}
This works:
document.form1.typM.checked = true;
This does not:
document.form1.theGroup.checked = true;
If I do an alert(theGroup); it does loop through the array.
WHAT AM I MISSING?!?!??!
jeni
I have an array of fields that I would like to update if the function is called.
The array will change - that part is working the sample I'm going to show is after the array is selected I want to update all checkboxes in that array to be checked.
var theGroup = ['typM', 'typSt', 'typSp'];
for (i=0; i < theGroup.length;i++)
{
update field to checked. Here's the problem.
}
This works:
document.form1.typM.checked = true;
This does not:
document.form1.theGroup.checked = true;
If I do an alert(theGroup); it does loop through the array.
WHAT AM I MISSING?!?!??!
jeni