[Javascript] check checkboxes in <fieldset>

David Dorward david at dorward.me.uk
Tue Aug 29 05:31:32 CDT 2006


On Tue, Aug 29, 2006 at 12:08:27PM +0200, Michael Borchers wrote:
> <fieldset id="usersGroups[3]">

http://validator.w3.org/ - that isn't an acceptable id, which must
begin with a letter ([A-Za-z]) and may be followed by any number of
letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons
(":"), and periods (".").

>  <tr>    <td><input type="checkbox" name="users_id[7]" value="22" 
> onclick="usersIdCheckboxSelect(this)">A</td>

Your inputs would benefit from labels.
http://www.w3.org/TR/html4/interact/forms.html#h-17.9.1

> </fieldset>i need a function to get (later check) all checkboxes within a 
> fieldset with a certain ID,in this case usersGroups[3], other fieldsets 
> will follow.how can i get the elements?

myFieldset.getElementsByTagName

-- 
David Dorward                                      http://dorward.me.uk




More information about the Javascript mailing list