client-side form validation
| From: | Jean-Christian Imbeault | Date: | Wed, 14 Aug 2002 01:28:33 +0000 |
| Subject: | client-side form validation | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112461@lists.php.net to get a copy of this message | ||
When a user hits the submit button I'd like to do some client-side validation before sending the form data to the server.
What is the proper way to do this in Javascript? I.e. should I use the form's Sumbit button's "onClick()" event to trigger the client-side Javascript validation function and the call "document.location.href" from the function? (Will this pass the POST data?)
Thanks!
Jc