checking for window existance

Discussion in 'HTML' started by Lambuz, Aug 30, 2005.

  1. Lambuz

    Lambuz Guest

    Is there any way to check the existance of a window by the name ?

    I'm using this code:
    window.open("http://www.google.com",'targetWin1')

    If I open a window using previous code without getting immediatly
    return value of open method, can I get it in a second moment ? For
    example using the value of param sName of open method ?

    regards
     
    Lambuz, Aug 30, 2005
    #1
    1. Advertising

  2. Lambuz wrote :
    > Is there any way to check the existance of a window by the name ?
    >


    No.


    > I'm using this code:
    > window.open("http://www.google.com",'targetWin1')
    >
    > If I open a window using previous code without getting immediatly
    > return value of open method,


    If there is no return value, then it means the function did not succeed
    and the window does not exist.

    > can I get it in a second moment ?


    I don't understand what you mean.

    For
    > example using the value of param sName of open method ?
    >
    > regards
    >


    Look for WindowObjectReference
    and in the FAQ :
    http://developer.mozilla.org/en/docs/DOM:window.open#FAQ

    GĂ©rard
    --
    remove blah to email me
     
    =?ISO-8859-1?Q?G=E9rard_Talbot?=, Aug 30, 2005
    #2
    1. Advertising

  3. Lambuz

    Jim Michaels Guest

    "Lambuz" <> wrote in message
    news:...
    > Is there any way to check the existance of a window by the name ?
    >
    > I'm using this code:
    > window.open("http://www.google.com",'targetWin1')


    sort of.
    var w=window.open("http://www.google.com",'targetWin1')
    if (null==w) {
    //oops. no window - must have been killed by a popup blocker.
    } else {
    //yay. got a window
    }
    do something with w
    w.close();
    window.focus();

    >
    > If I open a window using previous code without getting immediatly
    > return value of open method, can I get it in a second moment ? For
    > example using the value of param sName of open method ?


    I don't understand. second moment? what sName? you must be reading out of
    some book.
    in english?

    >
    > regards
    >
     
    Jim Michaels, Mar 3, 2006
    #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. rh0dium
    Replies:
    5
    Views:
    8,176
    Dave Cook
    Jun 19, 2005
  2. Banibrata Dutta
    Replies:
    0
    Views:
    221
    Banibrata Dutta
    Apr 28, 2008
  3. Andy B
    Replies:
    1
    Views:
    3,998
    Munna
    May 27, 2008
  4. Lambuz

    checking for window existance

    Lambuz, Aug 30, 2005, in forum: ASP General
    Replies:
    4
    Views:
    115
    Bob Barrows [MVP]
    Aug 30, 2005
  5. Eric Peterson

    checking existance of a directory

    Eric Peterson, Jan 20, 2005, in forum: Perl Misc
    Replies:
    9
    Views:
    151
    Tassilo v. Parseval
    Jan 21, 2005
Loading...

Share This Page