I\'m new a jQuery. I have gotten validate to work with my form (MVC 1.0 / C#) with this:
If you're using this validation plugin, it comes with a valid() method.
jQuery('input[type=submit]').click(function() {
var self = $(this);
if (self.data('clicked')) {
return false;
} else if (self.closest('form').valid()) {
self.data('clicked', true);
return true;
};
});
or even:
jQuery('input[type=submit]').click(function(event) {
var self = $(this);
if (self.closest('form').valid()) {
self.attr('disabled', true);
};
});