I am trying to use json data from an external provider api's. When I type their json url into the browser, it shows all the json data I need to see. However, when I try to access it using jquery, I get errors, even though google chrome shows the correct json data in the dev tools section:
Because of this, I assume it means that the data is actually getting retrieved? Anyway, this is the script I am using:
$.ajax({
url: "https://some_url_here_from_different_domain.json",
type: 'GET',
dataType: 'jsonp',
jsonp: 'callback',
error: function(xhr, status, error) {
alert(error); //<- returns Error: jQuery11020135121880332008_1387982597648 was not called
alert(xhr.responseText); //<- returns undefined
},
success: function(data) {
alert("success");
}
});
How do I get further error details so I can understand what's causing the error to appear?