Ajax,Php-Postback仅适用于Firefox

Im using ajax postback to post all fields of a form to a php page, that sets some sessions. It all works fine when im working with firefox, but when i tried chrome and IE, it just does nothing..

Here is my ajax:

$.ajax({
    type: 'POST',
    url: '../client_controller/teste',
    data: {
        form: $('#the-form-' + num).serialize(),
        key: num,
    },
    //async: false,
    //crossDomain: true,
    success: function (response) {
        alert(response);
    },
    error: function () {
        console.log($.makeArray(arguments));
    },
    complete: function () {
        console.log($.makeArray(arguments));
    },
});

I saw some posts about this, but all the solutions i saw do nothing in my case. The comented async and cross, were some of them.. And i dont want an empty data:, since i need to send those values.

Regards

Already found the answer!

When using serialize functions be careful when using markup language.

My problem was that I had a form that wasn't closed, and although it worked on Firefox, the other browsers couldn't process the serialize function!

Remove the trailing comma

complete: function() {
                    console.log($.makeArray(arguments));
                }

                , <------ THIS ONE
    });