Forum Moderators: open
My first page "frames.htm" has two frames, see below
***************
*
* frame1.htm
*
***************
*
* frame2.htm
*
***************
The code of frame2.htm looks like this:
<html>
<head>
<title>Hallo</title>
<script>
window.open("test.htm", "plugin");
</script>
</head>
<body>
</body>
</html>
Now test.htm is opened and this page also has two frames, see below.
***************
*
* ftest1.htm
*
**************
*
* ftest2.htm
*
**************
Now I want to change the page "frames.htm" in "change.htm" from the file "ftest2.htm".
How can I do that? The window.opener function does not work here. It works fine if I use the window.opener function in test.htm. But thats not an option.
Please advise asap!
Thanx
parent.opener
Since the window.open() function was in frame2.htm, and you want to change the URL of the frameset, you need to address the parent window of parent.opener, like this:
parent.opener.parent
Finally, you need to address the Location object of that window:
parent.opener.parent.location
So the code you require is:
parent.opener.parent.location='change.htm';
Once again: That is the Location object of the parent window of the current frame's parent's opener. Easy, huh?
(Argh... I think I was better off trying to learn irregular Russian verbs...)