Epsiloncool
Epsiloncool

Reputation: 1473

jQuery AJAX and IE8 outputs "Invalid argument"

guys! It is very strange thing. This code normally works in all browsers I know, except IE8 (may be IE7 too).

function xajax_xfrmproc(sender, eventname, data, formname, data2) {

var dt = {};
dt.__xr = 1;            // AJAX request flag
dt.__sender = sender;
dt.__eventname = eventname;
dt.__data = data;
dt.__formname = formname;
dt.__data2 = data2;

$.ajax({
    type: 'POST',
    url: '',
    data: dt,
    error: function(req, text, error) {
        alert('AJAX Error: ' + text + ' | ' + error + ':' + "\n" + req.responseText);
    },
    success: function (json) {
        jxr_decode(json);
    },
    dataType: "json"
});
}

It calls error method and writes: "AJAX Error: error | Error: Invalid argument".

You can test is online here: http://stat.8-800.su (enter any values and press "Войти в статистику" button).

I check in over all internet but not found anything useful. I've tried to set AddDefaultCharset utf-8, nothing happens.

Upvotes: 2

Views: 3737

Answers (1)

airportyh
airportyh

Reputation: 22668

This is a stab, but try using the actually URL instead of the empty string. So

url: '/',

Upvotes: 10

Related Questions