jQuery:
$.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);
}
});
Firebug Firefox Network
What happens
The AJAX "error:" event gets triggered and my console.log outputs are:
xhr.status -> 0
thrownError -> (empty String)
Is this normal? When I type the URL in a browser I receive a file download with the JSON content in it, this shouldn't be a problem right?