Re: QuickForm - adding Javascript Confirm

From: Date: Sun, 18 Sep 2005 13:52:47 +0000
Subject: Re: QuickForm - adding Javascript Confirm
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21050@lists.php.net to get a copy of this message
> Like, how do I add an onClick() to the checkbox element? > > Thanks, > Charles Hi Charles, I guess something went wrong with my previous email, so I'm resending this example of how to attach an onclick event. $form->addElement('checkbox', 'delete', null, 'Delete this thing', array('onclick' => 'this.checked=confirm("Checking this box will delete the thing! Do you really want to delete?")')); Hope this helps, Stoyan

« previous php.pear.general (#21050) next »