QuickForm submit-buttons coupled with verification javascript - how!?
| From: | Tommy Ipsen | Date: | Wed, 02 Jul 2003 17:35:02 +0000 |
| Subject: | QuickForm submit-buttons coupled with verification javascript - how!? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-6400@lists.php.net to get a copy of this message | ||
Hi
I have a form with the following "action" buttons:
$buttonsmodify[] = &HTML_QuickForm::createElement('reset', 'reset', 'Reset', array('class' => 'stdbutton'));
$buttonsmodify[] = &HTML_QuickForm::createElement('submit', 'delete', 'Delete', array('class' => 'stdbutton'));
$buttonsmodify[] = &HTML_QuickForm::createElement('submit', 'update', 'Update', array('class' => 'stdbutton'));
$form->addGroup($buttonsmodify);
I would like to attach a Javascript prompting the user "Are you sure you want to delete blabla" (Yes/No) if the "Delete" button is pressed. How can I accomplish this?
Regards,
Tommy Ipsen