Is that possible I can assign an window object variable to an already opened window

Discussion in 'Javascript' started by datactrl, May 28, 2004.

  1. datactrl

    datactrl Guest

    Hi, all

    Is that possible I can assign an window object variable to an already opened
    window? With window.open(), we can get a window object from opened window.
    If a window has already opened, is there any way I can attach that window
    with an object variable in javascript? Because I want to communicate with
    that window. Thank you in advance!

    Jack
     
    datactrl, May 28, 2004
    #1
    1. Advertising

  2. Re: Is that possible I can assign an window object variable to analready opened window

    Windows opened on other screens are inaccessable.

    You can regain control. Suppose I want to close a window that was opened
    on another page, and I don't have the object reference, but I do have
    the name of the window I can do the following:

    myWin = window.open("","<<windowname here>>");
    myWin.close();

    However, if the window refers to another site/domain you have no rights
    to modify/read the content. window.document is protected.

    I hope it helps.
    Vincent


    datactrl wrote:

    > Hi, all
    >
    > Is that possible I can assign an window object variable to an already opened
    > window? With window.open(), we can get a window object from opened window.
    > If a window has already opened, is there any way I can attach that window
    > with an object variable in javascript? Because I want to communicate with
    > that window. Thank you in advance!
    >
    > Jack
    >
    >
     
    Vincent van Beveren, May 28, 2004
    #2
    1. Advertising

  3. datactrl

    datactrl Guest

    Hi, Vincent

    Thanks a lot. What is the window name? Is it the text on window's title bar?

    Jack

    "Vincent van Beveren" <> wrote in message
    news:40b7405d$0$568$4all.nl...
    > Windows opened on other screens are inaccessable.
    >
    > You can regain control. Suppose I want to close a window that was opened
    > on another page, and I don't have the object reference, but I do have
    > the name of the window I can do the following:
    >
    > myWin = window.open("","<<windowname here>>");
    > myWin.close();
    >
    > However, if the window refers to another site/domain you have no rights
    > to modify/read the content. window.document is protected.
    >
    > I hope it helps.
    > Vincent
     
    datactrl, May 29, 2004
    #3
  4. Re: Is that possible I can assign an window object variable to analready opened window

    datactrl wrote:

    > Thanks a lot. What is the window name? Is it the text on window's title
    > bar?


    No, it is the internal name of the window, the value of the window.name
    property in the DOM and the name you would use for the "target" attribute
    if you wanted the referenced resource to be displayed in that window.

    > [Top post]


    Please do not do that, see the FAQ.


    PointedEars
     
    Thomas 'PointedEars' Lahn, May 29, 2004
    #4
    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. Tom Wild
    Replies:
    0
    Views:
    6,738
    Tom Wild
    Aug 14, 2003
  2. korean_dave
    Replies:
    3
    Views:
    531
    Mike Driscoll
    Jul 7, 2008
  3. Jase Schick
    Replies:
    11
    Views:
    602
    Geoff
    Aug 5, 2010
  4. Peter Pippinger

    NB: Hiding Menu-Bars in an already opened Window.

    Peter Pippinger, Nov 19, 2004, in forum: Javascript
    Replies:
    0
    Views:
    98
    Peter Pippinger
    Nov 19, 2004
  5. sowen
    Replies:
    2
    Views:
    177
    Thomas 'PointedEars' Lahn
    Aug 8, 2007
Loading...

Share This Page