Why do I get an “access denied” error message when I try to control another window/frame with Javascript?
This is due to security restrictions built into browsers, to prevent pages from one domain interfering with those in another; it is known as the “same origin policy” (see http://www.mozilla.org/projects/security/components/same-origin.html). The rules are explained in more detail on that page, but basically require pages to have the same domain, port and protocol to interact. Depending on what you are trying to do, you may be able to use a server-side script to read the remote pages and present them as you wish, or you may need to find an alternative method. If you are coding for a known environment (such as an intranet) you may be able to disable the same origin policy, depending on your browser.
Related Questions
- Why is an error message displayed when I try to Start Security Manager from the read-only policy window for the matching rule or signature?
- A pop-up window displaying a JavaScript runtime error message: "Do I wish to debug the JavaScript", what do I do, and what is causing this?
- Why do I get a JavaScript error when I try to use paging on a DataGrid control?