I\'m new to Javascript and am learning the basics via a textbook that focuses on its applications in IE 7+ and Firefox 2+. However, I am using Chrome and am getting the foll
If you don't want to use a local web server as suggested in the accepted answer you can run the browser with cross domain web security
/ same origin policy
disabled.
For Chrome:
Disable same origin policy in Chrome
For Firefox:
Disable cross domain web security in Firefox
https://addons.mozilla.org/en-US/firefox/addon/access-control-allow-origin/
Disable firefox same origin policy
This happens because Chrome doesn't allow frames from your hard disk to access each others' content. Which, technically we term as Cross-origin request.
Solution of the above problem is:
1. Either you host your webpage on a local web server. See the following link:
What is a faster alternative to Python's http.server (or SimpleHTTPServer)?
2. Use any other browser like Firefox