Hi I have a strange problem with where I host my website. Once every now and then the server goes down for no reason. I would like to know how I can avoid this error:
XMLHttpRequest cannot load file:///C:/.../strQnA.JSON.
Origin null is not allowed by Access-Control-Allow-Origin.
I am testing with chrome. I don’t want to have to upload my file every 5 min for test.
here is the code I use
var url ="strQnA.JSON";
var jsonQnA = jQuery.parseJSON(
jQuery.ajax({
url: url,
async: false,
dataType: 'json'
}).responseText
);
Thanks
Start chrome with –allow-file-access-from-files option