473,581 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find any open windows from different parents

J.R
I'm trying to determine if a named child window has been opened before
opening a new one, however my challenge is that the child window may have
been opened from a parent that no longer exists, therefore there is no
access to the child window handle. Any ideas?

Thanks All.
Jul 20 '05 #1
3 14112
"J.R" wrote:
I'm trying to determine if a named child window has been opened before
opening a new one, however my challenge is that the child window may have
been opened from a parent that no longer exists, therefore there is no
access to the child window handle. Any ideas?

Thanks All.


Just call window.open() with the same 2nd parameter (window name) as before.
If the window is currently open, the content will be directed to it, if it's
not open, it will be opened and the content loaded.

--
| Grant Wagner <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #2
J.R
Thank you for your reply Grant.

Yes, it does replace the named window using the method you suggested,
however when I check my window object reference opened by the now non
existent parent with the following code
WinObj = window.open(
theUrl,winName, 'scrollbars=no, resizable=no,to p=0,left=0,widt h=740,height=50 0
' );

WinObj does not any longer contain the windows handle, at least not
recognized by the new parent when I check as follows,

if(window.WinOb j == null)

and what I need to do is intercept this and respond to the user.

Any thoughts?

Thanks again, John.

"Grant Wagner" <gw*****@agrico reunited.com> wrote in message
news:3F******** *******@agricor eunited.com...
"J.R" wrote:
I'm trying to determine if a named child window has been opened before
opening a new one, however my challenge is that the child window may have been opened from a parent that no longer exists, therefore there is no
access to the child window handle. Any ideas?

Thanks All.
Just call window.open() with the same 2nd parameter (window name) as

before. If the window is currently open, the content will be directed to it, if it's not open, it will be opened and the content loaded.

--
| Grant Wagner <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html

Jul 20 '05 #3
Well, if page1.html calls WinObj = window.open(... , "TheName", ...), then the browser
containing page1.html is closed, of course your window reference will be lost.

So the solution is to do WinObj = window.open(... , "TheName", ...) on page2.html. You
will now have a new reference to the same window you opened before (or if the window
didn't exist, it will be opened and you will have a reference to that newly opened
window).

"J.R" wrote:
Thank you for your reply Grant.

Yes, it does replace the named window using the method you suggested,
however when I check my window object reference opened by the now non
existent parent with the following code
WinObj = window.open(
theUrl,winName, 'scrollbars=no, resizable=no,to p=0,left=0,widt h=740,height=50 0
' );

WinObj does not any longer contain the windows handle, at least not
recognized by the new parent when I check as follows,

if(window.WinOb j == null)

and what I need to do is intercept this and respond to the user.

Any thoughts?

Thanks again, John.

"Grant Wagner" <gw*****@agrico reunited.com> wrote in message
news:3F******** *******@agricor eunited.com...
"J.R" wrote:
I'm trying to determine if a named child window has been opened before
opening a new one, however my challenge is that the child window may have been opened from a parent that no longer exists, therefore there is no
access to the child window handle. Any ideas?

Thanks All.


Just call window.open() with the same 2nd parameter (window name) as

before.
If the window is currently open, the content will be directed to it, if

it's
not open, it will be opened and the content loaded.


--
| Grant Wagner <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
* http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
* http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1155
by: srussell705 | last post by:
I have a 1:1 relationship between tables and am finding that the parent is sometimes mising the child. How do I query for what is not there? TIA
55
4640
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's not obvious how the code works if you don't know the intricacies of the Property Let/Get syntax. Likewise, I dislike (and code to minimize the use...
0
1372
by: lanky_tx | last post by:
Hi All, I am trying to acess the rows within a child table of a windows form datagrid. I have tried using the CurrencyManager & BindingManagerBase to get the data but doesn't work. The problem is that when trying to retrive a row from a childtable in a datagrid using either objects it still retrieves the parents data. I want the...
3
7317
by: Michelle Stone | last post by:
hi al i have "variab1 = window.open ("a.aspx", "helloworld"); i do this inside a RegisterStartupScrict ("key", "<script language=javascript>******</script>"); where ***** is hte javascript comman i need to access variab1 from some other forms (to close it from another link from the parent's parent's parent's page). i figured out that the...
2
19223
by: Robert Degen | last post by:
Hello, I got a little problem. Seems very simple: * I want to open a popup window * Popup-window uses data from its father window. BUT a parent.window does NOT point to the real parents window. Alerting parent.window.location.href shows me, I'm at the wrong window location.
4
1852
by: Kaur | last post by:
I am reposting this message. I am a beginner using MS Access. I am working in MS Access 2000 and have created two forms. Form 1 is called frmParent (which has a read only subform called SfrmChild). FrmParent has a list box that lists all the Last Names of parents in the db. Clicking on one of the lastname of parent in the list box shows...
5
20071
by: cooltoriz | last post by:
Hello there, I am not asking how to impersonate a process within C# windows application. I already know that, in C# v2.0, you can easily achieve it using ProcessStartInfo. You can run a process or call external program as of different user. The problem of that design is that the mother application is still running as current user. I know...
0
2874
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi all, my problem is about services. I try comment you all steps for my issue: My development environment: Windows XP SP2
0
5992
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi all, my problem is about services. I try comment you all steps for my issue: My development environment: Windows XP SP2
0
7808
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...
1
7914
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
8181
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...
1
5683
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3809
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...
1
2309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1410
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1145
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.