Re: Client-validation but not on all buttons?

From: Date: Tue, 16 Dec 2003 15:09:17 +0000
Subject: Re: Client-validation but not on all buttons?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9588@lists.php.net to get a copy of this message
<pear@daniu.de> wrote : > Hi! > > How can I get JavaScript validation but not for all Buttons. In php it is > easy to get validation wherever (and only where) necessary but how can I > tell my JavaScript to ignore validation on "Cancel" Buttons > If I could overwrite the onSubmit-Action with JavaScript would be fine for > me - but I guess that is not possible, is it? Or can I add some code to the > JavaScript? 1. This is not the QuickForm mailing list so make sure you tell when you are asking a question about QuickForm otherwise one might think this is some HTML_Javascript question or whatever. 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='http://www.bigboobs.com';")); Good luck, Bertrand Mansion Mamasam

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