469,898 Members | 1,758 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

link in a pop up allowing to display a page in a frame

Hi,

I look for a script allowing to display a page in a frame as from a
link in a pop up (and close it in the same time
The name of my frame is "body"
In the pop up i try this function in the head section :

function reroutage() {
parent.frames["body"].window.location="assistance.htm";
window.close();
}

but it does not works, why ?

Thanks a lot
Jul 20 '05 #1
1 1291
baltimore wrote:
I look for a script allowing to display a page in a frame as from a
link in a pop up (and close it in the same time
The name of my frame is "body"
In the pop up i try this function in the head section :

function reroutage() {
parent.frames["body"].window.location="assistance.htm";
window.close();
}

but it does not works, why ?


Although also called "child window", the popup window is not part of the
frame hierarchy of the "parent window" but part of an own frame hierarchy.
Thus use `opener' or `opener.parent' instead of `parent'. You may also
have to call `window.close()' with setTimeout(...).
PointedEars
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Martin | last post: by
1 post views Thread by Aki | last post: by
17 posts views Thread by kimimaro | last post: by
6 posts views Thread by zino | last post: by
1 post views Thread by doris1202004 | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.