Closing a popup window from parent window, Opera 7

Discussion in 'Javascript' started by janne, Aug 20, 2003.

  1. janne

    janne Guest

    Hi,

    I am attempting to close a popup window from parent window with Opera.
    Popup is opened with parent window in page A, then actions in popup
    window cause parent window to move to page B, then page B tries to
    close the popup. The code which does this is:

    --------

    Page A:

    function openPopup() {
    popupWin = window.open('http://thenewaddress', 'popupname');
    }

    --------

    Page B:

    function closePopup() {
    popupWin = window.open('', 'popupname');
    popupWin.close();
    }

    --------

    With Netscape & IE this works and closes the popup, but Opera gives an
    error (javascript console):

    Inline script thread
    Error:
    name: ReferenceError
    message: Security error: attempted to read protected variable
    janne, Aug 20, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2lsZWVzaA==?=
    Replies:
    4
    Views:
    33,899
    =?Utf-8?B?U29sZWwgU29mdHdhcmU=?=
    Oct 14, 2004
  2. Satya
    Replies:
    0
    Views:
    434
    Satya
    Dec 15, 2005
  3. =?Utf-8?B?Vk1J?=

    Closing popup window when closing parent window?

    =?Utf-8?B?Vk1J?=, Feb 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    652
    Thomas Hansen
    Feb 15, 2007
  4. Urs Gubler
    Replies:
    0
    Views:
    152
    Urs Gubler
    Jul 2, 2003
  5. thomas
    Replies:
    0
    Views:
    226
    thomas
    Oct 23, 2003
Loading...

Share This Page