-2

I have a problem and i don't know how solve it. I would load a json file in Javascript. In firefox it's ok but in chrome, i don't know why but it doesn't work. I have this exception : jquery-3.1.1.min.js:4 XMLHttpRequest cannot load file://france.intra.corp .../pieChart.json. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. The json file exist and when i search this i find the good file. html code, javascript code

Thank you.

1 Answers1

0

in chrome you should use web server url to access your script due to CORS policy. run your script in a web server start with http://...