Find popup by name?

D

Daniel Loose

Hello,

I want to give a function that manipulates a document's content a
variable owner that contains either a frame/iframe name or a popup
name. I.e. the function automatically should perform the manipulation
with the correct target document. Like so

function do_something(owner) {

if (find_frame(owner)) doc = find_frame(owner).document
else if (find_popup(owner)) doc = find_popup(owner).document
else return false;

doc.write('bla');
}

find_frame is no problem, I simply cycle through the frame tree, i.e.
through all document.frames[] recursively. But how to do that with
popups?? Seems there is no popup array in the object model to walk
through (as it is for frames)?? How then to write find_popup?? Thanx a
lot, friends!!

Daniel

*************

Marty - it's perfect! You're just not thinking fourth dimensionally!
[Emmett "Doc" Brown]

If you wish to email me, please use newsreply at wuwei minus webservices dot de
 
G

GArlington

Hello,

I want to give a function that manipulates a document's content a
variable owner that contains either a frame/iframe name or a popup
name. I.e. the function automatically should perform the manipulation
with the correct target document. Like so

function do_something(owner) {

if (find_frame(owner)) doc = find_frame(owner).document
else if (find_popup(owner)) doc = find_popup(owner).document
else return false;

doc.write('bla');

}

find_frame is no problem, I simply cycle through the frame tree, i.e.
through all document.frames[] recursively. But how to do that with
popups?? Seems there is no popup array in the object model to walk
through (as it is for frames)?? How then to write find_popup?? Thanx a
lot, friends!!

Daniel

*************

Marty - it's perfect! You're just not thinking fourth dimensionally!
[Emmett "Doc" Brown]

If you wish to email me, please use newsreply at wuwei minus webservices dot de

It is NOT popups - it is windows, if you gave window (or a tab) a name
when you opened it you can address it again, though the only way I
found so far was to use javascript window.open() specifying the name.
This method leaves you with the possibility of opening the window
AGAIN after it was closed by the user...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top