Calling parent window from opened child popup window

This is a way to call the parent window from the popup it launched without adding hooks (just using the built in functionality).

From the parent window opening can be as simple as:

window.open('child.html');

From the child popup window to get a hook method “methodName” from the parent window:

window.opener.methodName();

From the child popup window to get a hook to the parent window elements:

window.opener.document.getElementById("sample").value;
 
2
Kudos
 
2
Kudos

Now read this

ES6 Callbacks, Promises, and Generators

This is the part of a series of blogs on the new features on the upcoming ECMAScript 6 (ES6) specification which JavaScript implements. However this post will not be as focused on ES6 as my other posts on ES6 as we aim to also cover... Continue →