Ammar Khan
Ammar Khan

Reputation: 2585

Browser Hang when form submit using Ajax

I am using jquery validate plugin, all works good but unfortunately when I try to submit form after all validation passed, sometime it get hang, Is it possible that I can submit form normally without using ajax?

$('#submitEnquiryForm').click(validate);

var validate = function () {



    $('#contactForm').validate({

        rules: {
            'first-name': {
                required: true
            }
        submitHandler: function (form) {
            // do other things for a valid form


                $('#contactForm').submit();

            return false;
        }
    });


};

Upvotes: 0

Views: 482

Answers (1)

Ammar Khan
Ammar Khan

Reputation: 2585

$('#submitEnquiryForm').click(validate);

var validate = function () {



    $('#contactForm').validate({

        rules: {
            'first-name': {
                required: true
            }
        submitHandler: function (form) {
            // do other things for a valid form


                $('#contactForm')[0].submit();

            return false;
        }
    });


};

Upvotes: 3

Related Questions