window.opener -- Access Denied

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Cohen

    #1

    window.opener -- Access Denied

    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="JavaS cript" type="text/javascript">
    window.opener.d ocument.forms[0].action="otherp age.asp";
    window.opener.d ocument.forms[0].submit();
    window.opener.c lose();
    </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

    #2
    Re: window.opener -- Access Denied

    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.c lose();
    - Finally, check the scripting security preferences of your browser.

    L8R

    "David Cohen" <david@paralega ltech.com> wrote in message
    news:3F1C0C1E.4 040303@paralega ltech.com...
    | 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="JavaS cript" type="text/javascript">
    | window.opener.d ocument.forms[0].action="otherp age.asp";
    | window.opener.d ocument.forms[0].submit();
    | window.opener.c lose();
    | </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
    |


    Comment

    Working...