views:

60

answers:

1

Hi all,

I have a webpage I'd like to use locally, without a web server, by simply opening the local HTML file in my browser. This webpage in question loads data via jQuery's getJson() method, as in:

$.getJSON("mydata.json", function(j) { 
...

The JSON files are also local, and are stored in the same directory as the webpage. When I attempt to use the page, I get:

Origin null is not allowed by Access-Control-Allow-Origin.

(Chrome 6 OS X, similar errors in Firefox and Safari).

Is there any way around this? Is it possible to load JSON from local files? Thanks!

A: 

Try running Chrome with --allow-file-access-from-files.

Ken Redler
Thanks for the suggestion. I get "unable to load file" when I try it that way.
mrjf