Hi,
I have a form wherein there are around 200-300 rows of homogenous
data, each having around 30 input fileds of its own.So totally, there
are more than 6000 input fields . Now, when the user submits this page,
i need to loop through the checkboxes and identify the ones that are
checked. I can't use the getElementsByName() since the checkbox names
are different. I'm using getElementsByTagName("input"). Because of the
huge amount of data, this method takes around 4-5 secs to evaluate
before submitting the form. Is there some way to get the collection of
checkboxes without having to loop through all the input fields?
RobG - 31 Jan 2006 07:33 GMT
> Hi,
> I have a form wherein there are around 200-300 rows of homogenous
[quoted text clipped - 6 lines]
> before submitting the form. Is there some way to get the collection of
> checkboxes without having to loop through all the input fields?
No. But if you supply the loop code, you may get suggestions for
optimisation.
For example, it may be faster to use the forms.elements collection to
get the list, or to build an array of references onload so you have them
already, or maybe to track click events on each checkbox and remember
whether they are checked or not so you already know their status when
the form is submitted.
Show some code...

Signature
Rob