external url reference error, local works
Posted: 22. September 2011 16:06
when i have a json file local, everything works fine.
when i call it in from an external url there is an error, any ideas why and how to fix it?
when i call it in from an external url there is an error, any ideas why and how to fix it?
- Code: Select all
$(document).ready(function(){
//var url='data.json';// << works fine
var url='http://www.myurl.com/data.json';//does not parse from localhost, but works on my godaddy server
$.getJSON(url, function(data){
$.each(data.data, function(i, entry) {
$("p:last").append(entry.img + '<br/>');
});
});
});