Accessing Another Internet Explorer Browser Window

Discussion in 'Javascript' started by ctrl.undo@gmail.com, Sep 5, 2006.

  1. Guest

    Hi,

    I'm not sure if this is possible, but I'm looking for a way to access
    another IE browser window using JavaScript (assuming the two browser
    windows are running in the same instance).

    The purpose of this task is so that if a user hits ctrl+n in IE, the
    new window is "aware" of the other instance.

    Thanks in advance,
    Tim.
     
    , Sep 5, 2006
    #1
    1. Advertising

  2. Randy Webb Guest

    said the following on 9/4/2006 10:07 PM:
    > Hi,
    >
    > I'm not sure if this is possible, but I'm looking for a way to access
    > another IE browser window using JavaScript (assuming the two browser
    > windows are running in the same instance).
    >
    > The purpose of this task is so that if a user hits ctrl+n in IE, the
    > new window is "aware" of the other instance.


    You can't.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
     
    Randy Webb, Sep 5, 2006
    #2
    1. Advertising

  3. Hi,

    wrote:
    > Hi,
    >
    > I'm not sure if this is possible, but I'm looking for a way to access
    > another IE browser window using JavaScript (assuming the two browser
    > windows are running in the same instance).
    >
    > The purpose of this task is so that if a user hits ctrl+n in IE, the
    > new window is "aware" of the other instance.
    >
    > Thanks in advance,
    > Tim.


    If you simply hit Ctrl-N and do nothing else, the existing window won't
    be aware of the newly opened window. However, if a Page gets loaded in
    the new window, if this page knows the name of the existing window
    (which name can be set by a script running in that existing window), and
    if the newly opened window calls

    var wExistingWindow = open( "", "existingWindowName", "" );

    then the variable wExistingWindow will contain a reference to the
    existing window. If both documents run in the same domain, you may even
    call a method in the existing window:

    wExistingWindow.notifyNewWindowOpen( self );

    Not sure I would rely on so many "if"s.

    HTH,
    Laurent
    --
    Laurent Bugnion, GalaSoft
    Software engineering: http://www.galasoft-LB.ch
    PhotoAlbum: http://www.galasoft-LB.ch/pictures
    Support children in Calcutta: http://www.calcutta-espoir.ch
     
    Laurent Bugnion, Sep 5, 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. Patrice Vogel
    Replies:
    0
    Views:
    519
    Patrice Vogel
    Mar 7, 2005
  2. cmay
    Replies:
    0
    Views:
    1,155
  3. Replies:
    0
    Views:
    1,115
  4. Ed Hauptman
    Replies:
    7
    Views:
    1,052
    Ed Hauptman
    Aug 7, 2009
  5. John Smith
    Replies:
    1
    Views:
    158
    Evertjan.
    Mar 12, 2005
Loading...

Share This Page