bmsterling wrote:
> Bruce,
> I had the same question a few weeks back and I more or less got the answer
> from Jörn. Let me look for the code that I made and we can see if that
> helps you.
>
> Meanwhile, you can take a quick look a that discussion and it may point you
> in the right direction.
>
> Ben
Good idea -- I found it and got it to work on first try. Here's the
method Jörn's suggested (as I implemented it):
//Add the following to validate.js default settings:
callback : null ,
------------
//add to isFormValid func under 'form has no errors' section
//...
if(this.settings.callback) {
// delegate submission to handler
this.settings.callback(this.currentForm);
return false;
}
----------
now you can do:
$(document).ready(function(){
var options = {
callback: function(){
// do Ajax or whatever
}
}
$("#form1").validate(options);
});
Thanks Ben & Jörn
Bruce
--
Bruce McKenzie
http://www.2MinuteExplainer.com
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/