View Full Version : Window.opener question

07-06-2002, 05:06 PM
Is it possible to use window.opener in frames...


main.htm ->


function al()


page.htm ->

<frameset cols="40,*">
<frame src="left.htm">
<frame src="right.htm">


right.htm ->

window.opener.al(); //this doesn't work... it's there so you get the picture... :rolleyes:


I was thinking if something like window.opener.opener.al() possible could work... :confused:

07-06-2002, 05:12 PM
remember its window.open not window.opener...

window.open can be used in frames but im not sure if it can be accessed by the page in the frame

07-06-2002, 06:27 PM
why don't you try somthing like this


i just used a location b/c i didn't know what your trying to do with the frame:D

07-06-2002, 07:34 PM
By ACJavascript: just used a location b/c i didn't know what your trying to do with the frame

It's the function ai() in main.htm that I'm trying to reach from right.htm, (thought that was fairly obvious...)

I can't use just window.opener because the page is in a frame.
If it had been just one new window it would have worked as I wrote in my first message...

07-06-2002, 07:54 PM
i don't think its possible to call a function in a different frame, or as window.opener. I could be wrong but i don't think so.

07-06-2002, 09:59 PM
You can't use opener in right.htm because right.htm was not opened by main.html. Page.htm was the page opened by main.htm so......

how about


07-07-2002, 05:27 PM
Hell, why didn't I think of that... top.opener.al()....

So obvious, thank you Spookster!