简体   繁体   中英

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.

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

url: '/',

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM