I have an external URL that gets parameters and prints a result like this:
{"result": "not_avail"}
I’m trying to use jQuery to get the result like this:
$.get("http://www.thepage.html?id=2&name=david", function(data){
alert("Data Loaded: " + data);
});
But nothing happens, I’m not getting an alert and not getting any errors in firebug. How can I solve this?
Due to browser security restrictions, most “Ajax” requests are subject to the same origin policy; the request can not successfully retrieve data from a different domain, subdomain, or protocol.
from official documentation
Try to use relative path tou your script (on same domain)