What is the checkbox array in the DOM?
Posted on 2004-08-16
I have a form with a couple of listboxes and a lot of checkboxes. I am looking to make all of these checkboxes unchecked.
for (var i=0; i<document.form.checkbox.length; i++)
document.form.checkbox[i].checked = false;
However, whenever I run this, I get an error that says that document.form.checkbox.length is null or not an object.
The only thing I can think of is that checkbox is not the array in the DOM that I am looking for.
What is the correct syntax for this?
BTW The checkboxes are not the same name, nor can they be the same name.