Connecting Tech Pros Worldwide Forums | Help | Site Map

Methods to get a reference to a child window

SteveKlett@gmail.com
Guest
 
Posts: n/a
#1: Feb 15 '08
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

Joost Diepenmaat
Guest
 
Posts: n/a
#2: Feb 15 '08

re: Methods to get a reference to a child window


"SteveKlett@gmail.com" <SteveKlett@gmail.comwrites:
Quote:
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/
Joost Diepenmaat
Guest
 
Posts: n/a
#3: Feb 15 '08

re: Methods to get a reference to a child window


"SteveKlett@gmail.com" <SteveKlett@gmail.comwrites:
Quote:
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/
Laurent vilday
Guest
 
Posts: n/a
#4: Mar 9 '08

re: Methods to get a reference to a child window


Thomas 'PointedEars' Lahn a écrit :
Quote:
Joost Diepenmaat wrote:
Quote:
>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
Closed Thread