473,569 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
3 2022
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("", "<<windowna me 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
Hi, Vincent

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

Jack

"Vincent van Beveren" <vi*****@provid ent.remove.this .nl> wrote in message
news:40******** *************@n ews.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("", "<<windowna me 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2178
by: Juan Garcia | last post by:
Subject says it all. Given: Window A with text field. Window B with a button (onClick opens Window C) Window C with a button (onClick I want it to modify text fields of Window A) I have tried storing the handle of Window A ( var winHandle = this; ) in a global variable/file ( globals.js ) and then accessing it from
9
1755
by: Christopher Benson-Manica | last post by:
In some old Javascript we have, we try to determine whether the client is IE or Netscape (assume for the purposes of this question that the question can be resolved satisfactorily) and tailor the script to it: var myOpen=open(url, 'subWin', 'width=600, height=400,*A*resizable=1,scrollbars=1' ); if ( myOpen && !myOpen.closed ) {...
14
37140
by: Frances Del Rio | last post by:
I'm trying to open a url in a new window while pg loads (but NOT in a pop-up..) I need to do sthg like // while pg is loading.. window.location ='page.html' // but I need this to open in a new blank window.. // (NOT in a pop-up, a regular new window..) can you do this?? thank you..
1
1160
by: Peter Pippinger | last post by:
Hello NG, Is it possible, to hide the menubars of a browser, if the window is already opened? I want to post a html-form to a "_blank" target (new window). This new window should have no Menubars. Thanks for any help! Peter
26
5649
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized several parts of the DOM, but this does not include the window object. Thank you
7
1964
by: multicherry | last post by:
Hi, Having searched for a way to fetch a window object by name, all I came across were answers along the line of... "All you have to do is say windowObj = window.open("blah", "name");" which isn't very useful if you want to fetch information from an existing document in the window. One solution I came up with was quite simple; open the...
3
2103
by: kosmodisk | last post by:
Hi, I'm having problem accessing javascript-created elements from opened window. This occurs only when I'm including another files in opened window, javascript or css. When I comment out "<link>" and "<script>" (point (0)), the script works fine. The opening window itself (point (1)) can access the object. When page has been loaded, then...
1
1460
by: CutCopyPaste | last post by:
Hi , I am trying to open a modal window but if t he window is already opened i need to just set the focus back . The Code is working fine in one environment but not live system on live system every time a window gets opened irrespective of an existing window. What i Assume is that htp.p(' function disp() {'); htp.p(' MyTimeOutWin =...
1
4088
by: waqasahmd | last post by:
Hi all, I have a Homepage.aspx on which there are search button when i clicked that button a new popup window is opened and i do some stuff there. Now i want that when i close that window i have a values in session, the previous Homepage.aspx(parent page) should be refreshed on whose Page_load i will get session. i tried...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.