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

B

baltimore

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
 
T

Thomas 'PointedEars' Lahn

baltimore said:
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
 

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

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top