Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

window.opener -- Access Denied

2 views
Skip to first unread message

David Cohen

unread,
Jul 21, 2003, 11:51:58 AM7/21/03
to
From the main window, I'm opening a popup window.

In that poupup window, the user loads a number of different pages (by
submitting forms and clicking on buttons), some of which are in a
different domain. But eventually, the user comes back to a page that is
in the same domain as the page in the main window.

On this page, I'm trying to execute the following script:

<script language="JavaScript" type="text/javascript">
window.opener.document.forms[0].action="otherpage.asp";
window.opener.document.forms[0].submit();
window.opener.close();
</script>

Yes, there is a form on the page that has been sitting in the main
window this whole time.

However, I'm getting an "access denied" error. Any thoughts?

Thanks,
David

Lee Harvey

unread,
Jul 23, 2003, 8:07:39 PM7/23/03
to
Several things may be going on:

- First and foremost, are both pages being hosted by the same domain?
- Unless the window.opener window was actually opened using a window.open()
command, then the following will not work: window.opener.close();
- Finally, check the scripting security preferences of your browser.

L8R

"David Cohen" <da...@paralegaltech.com> wrote in message
news:3F1C0C1E...@paralegaltech.com...

0 new messages