I am making the following ajax call from my HTTPS page,
$.ajax({
url: "http://www.w3schools.com",
dataType: 'jsonp',
crossDomain: true,
complete: function (e, xhr, settings) {
switch (e.status) {
case 200:
//everything fine
break;
default:
//Somethings wrong, show error msg
break;
}
}
});
But since I am making an HTTP call from an HTTPS page the call gets blocked. I can see a "insecure content warning" in console(CHROME),
but the error is not catched either in complete,error, or success. They simply don't fire at all.
I need to catch the error. Any way I can do this ?