note 39225 deleted from language.variables.external by didou
| From: | didou@php.net | Date: | Wed, 21 Jan 2004 13:33:22 +0000 |
| Subject: | note 39225 deleted from language.variables.external by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63944@lists.php.net to get a copy of this message | ||
Note Submitter: cheatah@tweakers.net
----
The 'check all' functionality is actually quite simple.
Don't use the short notation for handling form element data, use the long notation:
document.forms['id'].elements['name[]']
or with true DOM methods:
document.forms.namedItem('id').elements.namedItem('name[]')
Both should return an array (or actually an HTMLCollection of HTMLOptionCollection object).
You can use this to check all checkboxes in the array/object, for example.