473,785 Members | 2,987 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Methods to get a reference to a child window

I'm using a on-demand, SaS ERp application. I would like to customize
a few aspects of the application and I can as they have the ability to
"deploy" custom scripts with the served up pages.

One of the things that the page does it open a popup child window. I
can't directly hook into this process and get a reference to the
popped window, but I need to.

Are there any techniques to detect when a window opens another window?

It looks like the Window object doesn't have a collection of child
Windows, so I can't check that.. I really don't know what other
options there are.

I found one thread on google that covers this question and the answer
was "no" but it was pretty old thread, maybe something has changed?

In a nutshell, I need to detect when a new window opens up. Is that
possible and if so... can you give me some hints how it's
accomplished?

Thanks,
Steve
Feb 15 '08 #1
3 1557
"St********@gma il.com" <St********@gma il.comwrites:
In a nutshell, I need to detect when a new window opens up. Is that
possible and if so... can you give me some hints how it's
accomplished?
*if* the script opens a new window using window.open(), you *might* be
able to replace that method with something of your liking:

var oldopen = window.open;
function open() {
var win = oldopen.apply(w indow,arguments );
// do something here
return win; // return to calling code
}

This is completely untested and unresearched code.

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Feb 15 '08 #2
"St********@gma il.com" <St********@gma il.comwrites:
So I would basically be hijacking the built in method, I like it! ;0)

Thanks for the suggestion, I will check this out.
It should work, the main issue is that AFAIK browsers *may* make those
methods read-only. I'd be interested to know if it works on the usual
systems :-)

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Feb 15 '08 #3
Thomas 'PointedEars' Lahn a écrit :
Joost Diepenmaat wrote:
>I'd be interested to know if it works on the usual systems :-)

I wouldn't.
Do you really think anyone care about what you are or not interested ?

Please get real and go consult a psychiatrist while you are at it !

--
laurent
Mar 9 '08 #4

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

Similar topics

5
9195
by: Tim | last post by:
Hi all, How can I close a child window from the parent window, even if I don't know the child's name? I hope there's something like a window.childs array that I can use.. Tia, Tim
2
2446
by: John Dalberg | last post by:
I have a closed box system which opens an html page. The page closes by the system. I have access to the html page. I added code to open a child window from this page. However when the parent window closes, the child closes too. Is there a way to keep the child window open? Yes keep it orphaned. -- John Dalberg
5
4503
by: Shaun Pudwell | last post by:
Hi, I'm new to c# and come from a C / C++ background. My MainWindow class has a function called DrawChart. I open an MDI Child Window and want it to make a call from its class MDIChild to DrawChart which is the MainWindow class. Also, I want the chart counter to be incremented on each call to DrawChart, without being set back to its original value. From my MDIChild class, If I say:
0
1358
by: Jon | last post by:
I am writing an MDI app that uses a document manager class to keep track of opened child windows. I want the user to be able to close a child window, but then re-open the window from the "Window" menu if they want. What happens to the child window after it is closed? Even though my document manager maintains the instance of the child and displays the name in the menu, when I try to use the show() method or the activate() method on a...
1
11583
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at http://weblogs.asp.net/asmith/archive/2003/09/15/27684.aspx but it was far more complex then I needed. (I got lost trying to figure it all out). Therefore, here goes my simple "web dialog box with parent event handler fireing" solution. ...
5
8042
by: midnight_use_only | last post by:
hi all, quick question, how do you submit a form to a parent window from a child popup window? i have the following and all online documentation *suggests* that it should work but it does NOT: // Parent window: <script language="JavaScript"> function popup(url, name) { window.open(url, name, "width=800,height=600,scrollbars=yes");
2
1413
by: Bhishm | last post by:
Hi, I am opening a child window from parent using window.open, but on refreshing the parent the reference of the child is lost. Is there any way to save the reference of the child in the parent after refresh. I have searched a lot but not able to find any relevant information
5
2135
Frinavale
by: Frinavale | last post by:
This might be a very newbieish question but here it goes. I have a control that "pops out" when the user clicks a link. The control is a <div> element with some stuff in it that is asynchronously updated every few seconds. The user can click an image in the top left corner of the <div> to "pop-out" the control. The pop-out action is pretty simple: I call the window.open() method to open the control in a new window. After calling the...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10327
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10151
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8973
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5381
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.