JQuery "parsererror" when trying to use Ajax in IE 6

When using jQuery Ajax, I get parseerror in IE 6, Firefox works fine.

My code looks like this:

$.ajax({
   url: 'test.xml',
   type: 'GET',
   dataType: 'xml',

   error: function(XMLHttpRequest, textStatus, errorThrown) {
       alert('Error: ' + textStatus + ", " + errorThrown);
   },

   success: function(xml){
        ...
   }
});

Output: "Error: parsererror, undefined"

+3
source share
2 answers

Well, this happens when I execute the code in localhost. When I upload the code to a remote server, it works fine.

+4
source

Just a shot in the dark, but what happens when you rename the XMLHttpRequest argument?

+1
source

Source: https://habr.com/ru/post/1703424/


All Articles