Re: Yes/No radio button on QuickForm needs javascript alert "Are you sure" - how to do this?
| From: | l Burnerheimerton | Date: | Tue, 19 Jul 2005 16:17:30 +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-20059@lists.php.net to get a copy of this message | ||
Brilliant! Many thanks.
--- red <red@raven.ch> wrote:
> Try
>
> $btn[] =& $form->createElement( 'radio', 'like',
> null,
> 'Yes', 'Y' , array('onblur'=>'alert("Alert Message
> 1")'));
>
> HTH
> greets
> red
>
> l Burnerheimerton wrote:
> >>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
> >
> >
>
> --
> http://raven.ch/ - red@raven.ch - icq: 33960605
> Bahnhofstrasse 14 - 3400 Burgdorf - Switzerland
> Mobile: +41 76 373 70 20 - skype: syeo66
> PGP-Key: http://raven.ch/public_key.asc
> Draven - i am
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs