By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,477 Members | 1,632 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,477 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.