tags:

views:

202

answers:

2

Hello, i have a a parent window and inside it i have one more sub parent window and then i have a child window.Nw my problem is that i want to access my topmost parent window from bottommost childwindow.i was using window.opener but i m not able to access my parent window from botom most child window..plz help.how to use it using jquery or java script.

+1  A: 

I'm asuming you are talking about frames? Then you can use window.top to access the topmost frame.

Marius
Thanks Marius,No we are not using frames.Plz suggest an alternate to access parent window from bottom most child.* We are not using frames.
Then what are you using? How can you have a child window inside another window without a frame? Do you mean popups? Is one window opened and then that window opens another window? Try window.opener.opener.
Marius
Yeah marius,pop up inside pop up,i used window.opener.opener but its not working :( .Plz help.
A: 

Kind of obvious I guess...


for (var topopener = window; topopener.opener; topopener = topopener.opener);
alert("topmost window = " topopener.document.title);
Havenard