Код: Выделить всё
$.ajax({
url : url,
type : 'GET',
dataType: 'json',
data: {
'FN' : 'GetPages',
'PIN' : '7659'
},
xhrFields: {
withCredentials: true
},
crossDomain: true,
success: function(data) {
alert('succsess');
console.log('data', data);
},
error: function (xhr, ajaxOptions, thrownError) {
alert('error');
console.log(xhr.status);
console.log(thrownError);
}
});
Что происходит
Событие AJAX «ошибка:» срабатывает, и мой Выводы console.log:
xhr.status -> 0
thrownError -> (пустая строка)
Это нормально? Когда я ввожу URL-адрес в браузере, я получаю загрузку файла с содержимым JSON. Это не должно быть проблемой, верно?
Подробнее здесь: https://stackoverflow.com/questions/135 ... a-response