javascript - XMLHttpRequest cannot load file. Origin null is not allowed by Access-Control-Allow-Origin -
$.getjson('test1.json', function(data) { (i in data.conferences) { var item = data.conferences[i]; array1.push({ cid:item.id, confname: item.cname, confstart:item.start }); } });
i use function getting values java jquery. in chrome , opera shows same error, works on ie , mozilla.
give me solution please.
xmlhttprequest cannot load file:///c:/users/winnova1/desktop/tree/conferences/test1.json. origin null not allowed access-control-allow-origin.
uncaught typeerror: cannot read property 'conferences' of null
for security reasons, on chrome , opera cannot use xmlhttprequest
load local files.
must run on web server, if web server running on localhost
.
Comments
Post a Comment