Window.opener giving "Permission Denied" error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hussain123
    New Member
    • Jan 2007
    • 28

    #1

    Window.opener giving "Permission Denied" error

    We have a main window (call it Parent). Clicking on a link in the main window will open up another IE window (Child) using the loadInFrame() method.
    In the Child window, i load another IE window (which loads an applet. Call this SubChild). This is for the first time. Now if i go ahead and click on the link in the Parent window, the Child and the Subchild windows are refreshed. None of the windows are closed.

    Now if i refresh the Parent window, then the Child Window is refreshed but gives me an error saying the window.opener is null.

    Another problem is i get an "Access Denied" if i try close the Subchild window and try to refresh the child window. Am new to this and dont know how these relationships work.

    Note: Both the parent and the child window are in the same domain.

    Any help would be appreciated.

    Regards,
    Hussain
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    hi ...

    when you refresh the parent window all references are lost so you trash the opener-reference ... in case you need the interaction then just be sure that you close the child-window before you refresh the parent ...

    kind regards

    Comment

    • lkan
      New Member
      • Sep 2010
      • 1

      #3
      lk

      I have the same problem (window.opener giving "permission denied" error) except that in my case business requires me to keep the pop-up (child) window open.

      My question is why would reusing this window to load a URL give this exception?
      LK

      Comment

      • kovik
        Recognized Expert Top Contributor
        • Jun 2007
        • 1044

        #4
        It makes sense. Technically, that window no longer exists. Allowing the child access to a new, possibly unrelated window is a security hazard.

        When the reference is no longer valid, maybe you should just close the child window.

        Comment

        Working...