Re: QuickForm - adding Javascript Confirm

From: Date: Sat, 17 Sep 2005 15:01:25 +0000
Subject: Re: QuickForm - adding Javascript Confirm
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21052@lists.php.net to get a copy of this message
Hi Charles, Something like this should do: $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?")')); Stoyan On 9/17/05, Charles Kline <ckline@rightcode.net> wrote: > Is there a way to add a javascript confirm to a QuickForm? I have a > delete checkbox that I want to have a confirm alert if it is > submitted when that box is checked. No clue how to set that up. > > - Charles > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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