[Javascript] how to change the source propertie of a frame in a window from an other one

Kim Hoogenberg kim.hoogenberg at virgil.nl
Thu Sep 16 10:02:01 CDT 2004


Alexis Doublier wrote:

>Hi,
>
>I have an application using a master window with two frame: top and
>main.
>I open a popup from main frame of my master window. Now i want to "open"
>an new page in main frame from the popup when i click on a button. 
>
>Can i change the source propertie of the main frame from my popup? if
>yes how?
>I think i must use something like that:
>window.main.source="mycode.html"
>
>Do you have an idear ?
>
>Thanks
>
>Alexis
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
>  
>
Hello,

It really isn't that hard. You can use 
window.opener.main.document.replace('newURL'); from within the popup window.

window refers to the popupwindow itself, opener to your mainpage, main 
to the frame within your mainpage and document.replace is there to help 
you get where you want.

Greetz,

Kim



More information about the Javascript mailing list