user1275056
user1275056

Reputation:

Trying to get Ajax Form to Submit Only After jQuery Validation

I can't seem to figure out how to get my Ajax form to only submit when the jQuery validation function has taken place. Here is my code...

http://jsfiddle.net/gbaH7/16/

This is the validation plugin I'm using, http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Upvotes: 0

Views: 293

Answers (1)

Ilia Frenkel
Ilia Frenkel

Reputation: 1977

This code:

$("#contactForm").validate({
    submitHandler: function(form) {
        console.log("Call Login Action");
    }
});

should be inside $(document).ready(function() {. Worked for me.

Upvotes: 1

Related Questions