In ie 9, two parameters come to the success method: textStatus and XMLHttpRequest . Data always undefined . In all other browsers, the code works fine and 3 parameters come in success. As a result, I can not process any ajax request after it has been executed. What could be the problem?
Here is part of the method code:
SendAjax = function(async, type, act, t, datas) { var datatype = 'html'; if (type=='reload_weather' || type=='popup' || act == 'set_location') datatype = 'json'; var result = 0; $.ajax({ url: '_ajax/', data: {act:act, type:type, datas:datas}, type: "POST", dataType: datatype, cache: false, async: async, success: function(data, textStatus, XMLHttpRequest) { printArray(arguments); /* { "1": "success", "2": { "readyState": 4, "status": 200, "statusText": "OK" } } */ printArray(data); /* undefined */ } } } The Ajax request receives the data and the response text in the debugger ie I can see. There is what I need. But how can I process them in code and why they do not appear in the method of success?
UPDATE: the problem is solved by adding the following lines to the php file where the request is sent:
header('Content-type: text/html; charset=utf-8');
printArraymethod. - RubaXadebuggerintosuccessand running through the stack upwards, maybe you will see something. - RubaXa