How to tell if window.open created new?

Discussion in 'Javascript' started by kj, Jul 9, 2004.

  1. kj

    kj Guest

    Suppose I have the line

    w = window.open("", "foobar");

    How can I tell whether this call to window.open created a new window
    or simply returned a pointer to an already existing window called
    "foobar"?

    Thanks!

    kj
    --
    NOTE: In my address everything before the first period is backwards;
    and the last period, and everything after it, should be discarded.
    kj, Jul 9, 2004
    #1
    1. Advertising

  2. kj wrote:
    > Suppose I have the line
    >
    > w = window.open("", "foobar");
    >
    > How can I tell whether this call to window.open created a new
    > window or simply returned a pointer to an already existing
    > window called "foobar"?


    There would be no difference to detect much of the time. If an already
    open window has been in use it may have acquired length to its history,
    but that is not guaranteed to have happened.

    Richard.
    Richard Cornford, Jul 9, 2004
    #2
    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. Paul
    Replies:
    0
    Views:
    653
  2. Gordon
    Replies:
    3
    Views:
    296
    Steven Burn
    Apr 16, 2004
  3. Richard Bell
    Replies:
    2
    Views:
    131
    Richard Bell
    Feb 9, 2004
  4. PC HUA
    Replies:
    2
    Views:
    404
    PC HUA
    May 19, 2004
  5. kj
    Replies:
    2
    Views:
    81
Loading...

Share This Page