Rick Faircloth schrieb:
> Also... to Jorn... Jorn, do you know how I can
> disable a submit button while errors are present in a
> form using your validation plug-in, then have the
> submit button re-enabled once the form entries
> are error-free?
You need to think the other-way round. Just disable your "default
behaviour" as long as the form is invalid.
The validation plugin provides a submitHandler callback. Put your
calculation/ajax request inside of that, and it is only executed when
the form is valid.
Something like this:
$(...).validate({
...,
submitHandler: function() {
// send AJAX request for calculation
}
});
So in your case, move the stuff that gets executed when you click the
submit button into the submit handler, and remove the click event entirely.
The form will never be submitted when you provide a submitHandler.
--
Jörn Zaefferer
http://bassistance.de
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/