Window opener Property
Write some text to the source (parent) window:
var myWindow = window.open("", "myWindow", "width=200, height=100");
// Write some text in the new window
myWindow.document.write("<p>This is 'myWindow'</p>");
// Write some text in the window that created the new window
myWindow.opener.document.write("<p>This is the source window!</p>");
Definition and Usage
The opener property returns a reference to the window that created the window.
When opening a window with the window.open() method, you can use this property from the destination window to return details of the source (parent) window.
Coding Tip: window.opener.close() will close the source (parent) window.
|Return Value:||A reference to the window that created the window|