Srinath Thota
Srinath Thota

Reputation: 1248

Not working on jquery 1.9.1 version

$('#postform').submit(function() {
            $(this).ajaxSubmit(options);
            return false;
});

The code above is not working when i upgraded my site to jquery 1.9.1

Upvotes: 0

Views: 987

Answers (2)

Hemant_Negi
Hemant_Negi

Reputation: 2078

Use jquery ajax to submit your form insted of ajaxSubmit()

syntax.

var frm = $('#postform');

       $.ajax({
            type: frm.attr('method'),
            url: frm.attr('action'),
            data: frm.serialize(),
            success: function (data, status, xhr) {

                //call back handling here

                }

        });

refrence : http://api.jquery.com/jQuery.ajax/

Upvotes: 2

Rob
Rob

Reputation: 919

The function ajaxSubmit is not a core function of the jQuery library but a plugin called "form".

You can download in here: http://jquery.malsup.com/form/

After including the corresponding js file into your page, your code should work.

Upvotes: 5

Related Questions