By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,297 Members | 1,409 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,297 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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


Jul 23 '05 #2

P: n/a
Hi, Vincent

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

Jack

"Vincent van Beveren" <vi*****@provident.remove.this.nl> wrote in message
news:40*********************@news.xs4all.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

Jul 23 '05 #3

P: n/a
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
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.