I have a javascript part that captures JSON data. When executed locally, everything works fine. However, when I try to access it from another site, it does not work.
Here is the script.
$(function(){ var aT = new AjaxTest(); aT.getJson(); }); var AjaxTest = function() { this.ajaxUrl = "http://mydeveloperpage.com/sandbox/ajax_json_test/client_reciever.php"; this.getJson = function(){ $.getJSON(this.ajaxUrl, function(data){ $.each(data, function(i, piece){ alert(piece); }); }); } }
You can find a copy of the same file under http://mydeveloperpage.com/sandbox/ajax_json_test/ ".
Any help would be greatly appreciated.
Thanks!
source share