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. Advertisements

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. Earl Teigrob
    Replies:
    4
    Views:
    1,408
    Vidar Petursson
    Jun 5, 2004
  2. =?Utf-8?B?U2lsZWVzaA==?=
    Replies:
    4
    Views:
    34,437
    =?Utf-8?B?U29sZWwgU29mdHdhcmU=?=
    Oct 14, 2004
  3. Satya
    Replies:
    0
    Views:
    512
    Satya
    Dec 15, 2005
  4. =?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:
    883
    Thomas Hansen
    Feb 15, 2007
  5. JohnE
    Replies:
    0
    Views:
    1,368
    JohnE
    Jan 10, 2010
  6. Urs Gubler
    Replies:
    0
    Views:
    302
    Urs Gubler
    Jul 2, 2003
  7. thomas
    Replies:
    0
    Views:
    419
    thomas
    Oct 23, 2003
  8. gokul
    Replies:
    3
    Views:
    981
    Grant Wagner
    Dec 2, 2003
Loading...