473,320 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 14095
"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*****@agricoreunited.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,top=0,l eft=0,width=740,height=500
' );

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

if(window.WinObj == null)

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

Any thoughts?

Thanks again, John.

"Grant Wagner" <gw*****@agricoreunited.com> wrote in message
news:3F***************@agricoreunited.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*****@agricoreunited.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,top=0,l eft=0,width=740,height=500
' );

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

if(window.WinObj == null)

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

Any thoughts?

Thanks again, John.

"Grant Wagner" <gw*****@agricoreunited.com> wrote in message
news:3F***************@agricoreunited.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*****@agricoreunited.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
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
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...
0
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...
3
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...
2
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...
4
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)....
5
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...
0
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
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.