RE: [PEAR] Client-validation but not on all buttons?
| From: | Mike Carter | Date: | Wed, 17 Dec 2003 16:07:24 +0000 |
| Subject: | RE: [PEAR] Client-validation but not on all buttons? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9619@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Bertrand Mansion [mailto:bmansion@mamasam.com]
> Sent: 16 December 2003 15:09
>
> 2. Assuming this is a QuickForm question, I would suggest you
> make your
> cancel button a regular button (not a submit) and use something like:
>
> $buttons[0] =& HTML_QuickForm::createElement('button',
> 'cancel', 'Cancel',
> array('onclick'=>"javascript:location.href='”
> òÐûŒ£iv¦
„Æghttp://www.bigboob
> s.com';"));
I created a nice simple cancel button element for Quickform which removed
the need to duplicate the javascript all the time. It provides the facility
to pop up a message to confirm the user really does want to quit first too.
Provide a message for the question or pass an empty string to make it a
basic cancel button. It works but may not be "correct" for QF format.
I've attached the custom element, although I do not know what the policy is
for attachments here - if it is stripped feel free to email me to get a
copy.
Regards,
Mike C.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________