Checking for new or popup window and activating close button

Discussion in 'Javascript' started by andrewkooi, Aug 31, 2004.

  1. andrewkooi

    andrewkooi Guest

    Greetings,

    I do not know whether such code exist but no harm asking:

    Is it possible for me to make visible a close button if the active
    window is a popup window or a new window (other than the main window)?

    What I mean is this:

    If the present window is the main window, then the close button should
    not be visible on the page. Otherwise, the close button should be made
    visible and active (i.e. can be clicked to close the window).

    Any help is much appreciated.

    Andrew
    andrewkooi, Aug 31, 2004
    #1
    1. Advertising

  2. andrewkooi wrote:

    > Is it possible for me to make visible a close button if the active
    > window is a popup window or a new window (other than the main window)?


    If that is the case, the "opener" property of the current Window object
    is not null, otherwise it is a reference to the opener Window object.

    >


    Put this in your Reply-To header.


    HTH

    PointedEars
    Thomas 'PointedEars' Lahn, Sep 4, 2004
    #2
    1. Advertising

  3. andrewkooi wrote:

    > Is it possible for me to make visible a close button if the active
    > window is a popup window or a new window (other than the main window)?


    If that is the case, the "opener" property
    of the current Window object is not null.

    >


    Put this in your Reply-To header.


    HTH

    PointedEars
    Thomas 'PointedEars' Lahn, Sep 4, 2004
    #3
    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. Jens Peter Hansen
    Replies:
    7
    Views:
    500
    Randy Webb
    Jun 19, 2004
  2. Raffi
    Replies:
    4
    Views:
    204
    Dr John Stockton
    Aug 12, 2004
  3. andrewkooi
    Replies:
    6
    Views:
    163
    Thomas 'PointedEars' Lahn
    Sep 4, 2004
  4. Shang Wenbin

    close current window using window.close()

    Shang Wenbin, Sep 1, 2005, in forum: Javascript
    Replies:
    10
    Views:
    356
    GĂ©rard Talbot
    Sep 2, 2005
  5. Replies:
    2
    Views:
    449
Loading...

Share This Page