Closed Thread Icon

Preserved Topic: Getting the top window Pages that link to <a href="https://ozoneasylum.com/backlink?for=18117" title="Pages that link to Preserved Topic: Getting the top window" rel="nofollow" >Preserved Topic: Getting the top window\

 
Author Thread
Yossi Admon
Bipolar (III) Inmate

From: Israel
Insane since: Nov 2001

posted posted 12-05-2001 09:18

hi.
I have a frameset page that contain some frames and framesets that contain some frames and framesets and so on, Is there is a way to find the first frameset window?

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 12-05-2001 13:59

perhaps if you write an recursive loop like that:

code:
function getParent(o)
{
if (o.parent)
return getParent(o.parent);
else return o;
}
getParent(window);



bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 12-05-2001 15:00

It's also "top"



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 12-05-2001 15:51

bit, never tried top, always used .parent...but this will this .top of yours get the top of the top of the top .... ?

Yossi Admon
Bipolar (III) Inmate

From: Israel
Insane since: Nov 2001

posted posted 12-05-2001 17:52

I wrote it the same way with top and in the end I got an object that is not a window why is that?

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 12-05-2001 20:45

top should be the uppermost window/frameset.

( you don't want to use it with lallous' code it should just refer to the framseset you were looking for)

For nested popups/framse I sometimes find it easiest to start from "top" and work down.



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

« BackwardsOnwards »

Show Forum Drop Down Menu