jQuery ajax response not working in IE11

1

I'm trying to create a loginpage with jQuery/AJAX, my code work well in other browser but i have a problem in IE11. IE11 throw an exception

SCRIPT7002: XMLHttpRequest: Network Error 0x800c0008, The download of the    specified resource has failed.

Code

    $.ajax({
        type: 'post',
        url: $('#form-login').attr('action'),
        data: $('#form-login').serialize(),
        success: function (data) {
            if (isJson(data)) {
                ...
            }
        },
        complete: function (data) {
            console.log(data);

            if (data.status == 302) {
                location.href = data.responseText;
            }
        }
    });`
javascript
jquery
ajax
internet-explorer-11
asked on Stack Overflow Jul 3, 2017 by helmis.m

1 Answer

1

It seem that the problem is only with 302 (redirect Response), i changed it to 203 and all work fine.

answered on Stack Overflow Jul 25, 2017 by helmis.m

User contributions licensed under CC BY-SA 3.0