[thelist] JavaScript: check all boxes within a table

Bill Haenel mail at webmarketingworx.com
Wed Feb 12 21:56:00 CST 2003


> it'd be a trivial task if the names of the checkboxes were
> unique to each table.

I'm actually trying to avoid this, because it makes coding on the
receiving end of the form process more complicated. i.e., instead of
running through an array and handling each key/value, I'd have to run
through an array for each individual table. That would work nicely,
though, for the 'checkall' part, wouldn't it?

> however, if they're all named the same, you'd need a function
> that you'd pass the index of the specific checkboxes you wanted
> to set to all or none checked.

I am pretty sure I could not make this work, since there will be a
variable number of checkboxes, and I never know what the range of
indexes might be. I was kind of hoping there would be some gee whiz
method for identifying the contents of a table by id or something. Any
such luck?

Thanks,
BH




More information about the thelist mailing list