$.ajax({
type: 'GET',
url: 'URL to access data',
contentType: "application/json",
crossDomain: true,
cache: true,
dataType: 'jsonp',
success: function (result) {
},
error: function (e) {
console.log(e.message);
}
});
Even if there is an error handler attached to the ajax call above, cross domain requests won't handle any error or exceptions. This is a limitation for jQuery JSONP calls.
No comments:
Post a Comment