Re: [ PEAR ] - Quickform Event
| From: | Justin Patrin | Date: | Thu, 10 Feb 2005 16:24:46 +0000 |
| Subject: | Re: [ PEAR ] - Quickform Event | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17480@lists.php.net to get a copy of this message | ||
On Wed, 9 Feb 2005 22:59:46 -0800, Colin Ross <cross@intraxinc.com> wrote:
> Off the top of my head....you add it as an attribute to the submit button, right?
> Like:
> addElement('button','name', 'value',
> array('onClick'=>'alert('Are you sure?')'));
> just a blind guess, but a start
> c
or:
$el =& $form->getElement('elementName');
$el->updateAttributes(array('onclick' => 'someJavaScriptFunction(this)'));
>
> -----Original Message-----
> From: Cédric Fournier [mailto:cfournier@itop.fr]
> Sent: Wednesday, February 09, 2005 10:12 PM
> To: pear-general@lists.php.net
> Subject: [ PEAR ] - Quickform Event
>
> Hi all,
>
> I want to add an JS event on a submit button. Something like a confirm. How
> could i implement this beavior ?
>
> Thanks fo your answers,
> Cedric
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> !DSPAM:420b0971259631269935110!
>
>
--
Justin Patrin