[thelist] check all checkboxes, DOM etc

Tom Dell'Aringa pixelmech at yahoo.com
Thu Sep 19 14:06:01 CDT 2002


--- Fernando_Gómez <fgomez at criba.edu.ar> wrote:
> >   for (i = 0; i < targetform.elements.length; i++)
>
> > Seems it should work, and it does when I first load the page with
> > only 1 default row. But once I add rows, it doesn't work. It
> almost
> > seems as if it doesn't see the new rows and checkboxes. Here is a
> > typical row (in fact the default row)
>
> A simple and perhaps silly question: are you sure that all the
> added
> checkboxes are appended as children (or at least descendants) of
> targetform?
>
> Have you tried an alert(targetform.elements.length)  ?
>
>
> Fernando Gómez

I have tried that and get wierd results, forgot to mention. Initially
I will get 2 as the length, which is correct. But if I add a few i
might get a 3 when there is really 5, its not consistent. So maybe
you are right..how do I make sure they are children/descendents? I
assumed since they are added INSIDE the form tags they were...

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com



More information about the thelist mailing list