473,386 Members | 1,706 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,386 software developers and data experts.

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 1537
"St********@gmail.com" <St********@gmail.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(window,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********@gmail.com" <St********@gmail.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
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
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...
5
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...
0
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"...
1
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...
5
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: ...
2
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...
5
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.