[Javascript] Active windows - child reloads parent
Paul Novitski
javascriptlist at dandemutande.org
Sun Dec 14 01:22:16 CST 2003
In case you can't see the source code in that last message of mine, here's
that demo online: http://www.wildcanada.net/testing/onUnLoadParent.html
Paul
At 11:09 PM 12/13/2003, you wrote:
>Tim & Peter,
>
>Another way to do this is with onUnLoad(), reload(), and opener.
>
>The onUnLoad() event executes if the current window is closed, reloaded,
>or loaded with another page. The reload() method refreshes the referenced
>window. The opener property refers to the parent of the current (child)
>window.
>
>In the child window you can execute:
> window.opener.document.location.reload();
>or more simply:
> window.opener.location.reload();
>
>Here's a demo involving two html files. Open the parent window, then
>click on the link to open the child. You can refresh the date/time
>display in the parent from the child window by clicking on the first link,
>and when you close the child window (either by clicking on the second link
>or by using the window's own Close control) the parent's date display is
>likewise refreshed.
>
>Paul
More information about the Javascript
mailing list