Click to See Complete Forum and Search --> : Windows and Frames


Atimo
01-28-2003, 09:44 PM
The main window of a page I am developing has 3 frames: A, B and C.
Frame B opens a new window with window.open("","New Window")

The "New Window" promps the user to fill in some information, and when he hits the submit button, I wanted the "New Window" to close, and the information displayed in Frame A to be updated.

I cannot use window.opener.location.href="file.asp" because the frame that opened the window was Frame B. I want to update Frame A, from "New Window".

How can I do that?

Atimo
01-28-2003, 10:32 PM
Uauh! You were fast answering my question! I hope I will be that lucky all the time!

I tried your suggestion and it didn't work.

But I was browsing the internet for that matter, and I found a script that helped me.

I used:

window.parent.opener.parent.FRAMEA.document.location.href="file.asp";

It seemed strange, but it worked.

Thank you very much for your reply.

Atimo
01-29-2003, 09:32 AM
Thank you again for your time.

I tried what you suggested and it didn't work.

<script language="JavaScript" type="text/javascript">
function updw() {
top.opener.top.title.location.href="instructions.asp";
//window.parent.opener.parent.title.document.location.href="instructions.asp";
window.close();
}
</script>

Nevertheless, I find it fascinating.
I am discovering so many new things!

I am using Internet Explorer 6.0.
The window.parent.opener.parent.title.document.location.href works perfectly well.

I certainly want my code to work in Netscape as well, but dont worry, it is not a big issue, because my audience is internal (the company).

On the other hand, for the purpose of learning more, if you have any further suggestions, don't hesitate to say.

Thank you again.