jquery validate form before ajax post

Posted by Unknown
jquery validate form before ajax post:

Use submit handler to validate your form in ajax submission


$(document).ready(function() {
    $('#FormId').validate({
        submitHandler: function(form) {
            $.post('/sample.aspx/getmethod', $('#FormId').serialize());        }
    });
}); 
See demo here
Labels:

Post a Comment

 
test