You are trying to read a file from your client machine with file: protocol, which is not safe. It doesn't work in Chrome, because Chrome cares about the security issues more than other browsers. it seems to me you are trying to create a sample ajax.
What you can do is simply disable the web security in chrome, if it is just a sample testing, open your Chrome in comand line with this parameter:
--disable-web-security
and if it is not a sample test, you have to put your file on a server that you have access to it and use http ajax call instead of file ajax call.
If you had this problem on the web, there would be two options to fix it, using JSONP or enabling CORS. but in file protocol I can offer you to fake a JSONP call like this:
-first it you json file is like this:
[{
name : "abc" //...
},
{
name : "efg" //...
}]
change it to (wrap it in a function call):
callback([{
name : "abc" //...
},
{
name : "efg" //...
}])
then do this instead of jQuery ajax call:
window.callback = function(jsonObj){
//
};
var script = document.createElement('script');
//since this is a fake jsonp call you don't need to add ?callback=callback to url
script.src = 'aptitude14.json';
document.getElementsByTagName('head')[0].appendChild(script);