X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=lib%2FCGI%2FEx%2Fvalidate.js;h=a3b98ebb912a2ce16457fadbd88fba1554542340;hp=a5014afef5d789226419a9055965a986d62f71ab;hb=3fe8e76eb82e9d74f656674c5ba913950e166ab1;hpb=a8620142ba0dcda3f0c5f102f791df944ed2245e diff --git a/lib/CGI/Ex/validate.js b/lib/CGI/Ex/validate.js index a5014af..a3b98eb 100644 --- a/lib/CGI/Ex/validate.js +++ b/lib/CGI/Ex/validate.js @@ -4,7 +4,7 @@ * Based upon CGI/Ex/Validate.pm v1.14 from Perl * * For instructions on usage, see perldoc of CGI::Ex::Validate * ***----------------------------------------------------------------**/ -// $Revision: 1.34 $ +// $Revision: 1.35 $ function Validate () { this.error = vob_error; @@ -1047,7 +1047,8 @@ document.check_form = function (form, val_hash) { document.load_val_hash(form, val_hash); // attach handler - form.onsubmit = function () {return document.validate(this)}; + var orig_submit = form.onsubmit || function () { return true }; + form.onsubmit = function (e) { return document.validate(this) && orig_submit(e, this) }; } // the end //