console stmts don't print, in FF.... (???)
and in Chrome, not even the JSON content prints..
path to JSON: json/rockbands.json
Chrome is looking for:
PS: actually I just realized: on my example online Chrome prints the JSON content fine, but not in my local (just plain local, in my Tomcat environment no problem.. why is this??? is this a JSON quirky thing, or would the same thing be happening with XML? now this local/vs/env problem occurs ONLY in Chrome... in FF JSON content prints fine when I'm NOT in Tomcat, i.e., just loading the file from the finder... i.e., why does FF print JSON content fine when I'm not in a webapp environment but Chrome doesn't???)
as for the console stmts, Chrome prints them fine, FF doesn't print them at all, regardess of environment.... (???)
It sounds like this could be the problem that Chrome has with loading data via xmlhttp requests (ajax) when the page is loaded direct from the filesystem. I usually develop on a local server, which avoids the problem.
One possible solution is to run the browser with the following flag:
You can read more about it here: http://stackoverflow.com/questions/4208530/xmlhttprequest-origin-null-is-not-allowed-access-control-access-allow-for-file
ok... I guess I need to do JSON from localhost....
thank you... so how does it work when you run a program from the command line... you have to run it from the command line every time you open it to pass it that param?
This topic is now closed. New replies are no longer allowed.