QuickForm multiple checkboxes and Javascript
| From: | Webmaster | Date: | Fri, 15 Apr 2005 14:19:06 +0000 |
| Subject: | QuickForm multiple checkboxes and Javascript | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18762@lists.php.net to get a copy of this message | ||
Hi,
I have the following problem.
I select x rows from my database and dispaly them in table rows.
Each Tablerow should have a checkbox field wich can be checked and sended to
delete the database entry.
Therefore I generate the checkboxes the following way.
foreach($rows as $tmp)
{
$form->addElement('checkbox','line['.$tmp->id.']','Barrierefrei','','','0');
}
Now I get checkboxes looking like that.
<input type="checkbox" name="line[12]" id="line[12]"
value="1">
<input type="checkbox" name="line[45]" id="line[45]"
value="1">
Now to my problem. Is there a way to select or deselect all Checkboxes with
a Javascript ?
Thank you very much.
Mirco Blitz