Re: Client-validation but not on all buttons?

From: Date: Tue, 16 Dec 2003 21:13: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-9606@lists.php.net to get a copy of this message
Hi! Daniel Kopp wrote:
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?
You *can* override onsubmit action in javascript. Check out the CVS version of rules-builtin.php example of QuickForm, there is a checkbox there that toggles client-side validation. You can adapt this for your needs.

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