Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why do I get an “access denied” error message when I try to control another window/frame with Javascript?

0
Posted

Why do I get an “access denied” error message when I try to control another window/frame with Javascript?

0

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123