Re: Yes/No radio button on QuickForm needs javascript alert "Are you sure" - how to do this?

From: Date: Tue, 19 Jul 2005 14:40:49 +0000
Subject: Re: Yes/No radio button on QuickForm needs javascript alert "Are you sure" - how to do this?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20057@lists.php.net to get a copy of this message
> Hi, > > l Burnerheimerton wrote: > > I have a form where one of the fields is a Yes/No > > radio button. > > > > I want a javascript alert to appear when they try > to > > change it asking, "Are you sure you want to change > > it?" or something like that. If they choose yes, > it > > processes. If they choose no, it does not > process. > > > > Any ideas how to make this happen within > QuickForm? > > Well, can you implement this without QuickForm? > > -- Yes: <label><input name="RadioGroup1" type="radio" onBlur="alert('Alert Message 1')" value="Y">Yes</label> <label><input name="RadioGroup1" type="radio" onBlur="alert('Alert Message 2')" value="N">No</label> How would you add that javascript functionality to: $btn[] =& $form->createElement( 'radio', 'like', null, 'Yes', 'Y' ); $btn[] =& $form->createElement( 'radio', 'like', null, 'No', 'N' ); $form->addGroup ( $btn, 'radioS', 'Do you like the page: ' ); Thanks for any ideas. ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs

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