"NS_ERROR_DOM_BAD_URI: Access to restricted URI denied" "NS_ERROR_DOM_BAD_URI: Access to restricted URI denied" ajax ajax

"NS_ERROR_DOM_BAD_URI: Access to restricted URI denied"


I was having the same error and the solution is to have your index.html, script.js and data.json in the same directory.


Specify your .json file relative to your .html file root

Ex:

d3.json("js/forcetree.json", function(json) {  root = json;  update();});


I solved this issue by moving the JSON file to a subdirectory of the directory containing my html file.

BROKEN:

www/  code/    hello.html    # refers to ../data/hello.json  data/    hello.json

WORKING:

www/  hello.html      # refers to data/hello.json  data/    hello.json