2k views
Call a function in the parent window of a pop-up
First, define the function you want to call from the pop-up in the parent window:
Javascript
- function functionInParent()
- {
- // ...
- }
Then, in the pop-up:
Javascript
- // ...
- if (window.opener && !window.opener.closed)
- {
- window.opener.functionInParent();
- }
- // ...
Submitted by miguelSantirso over 2 years ago — last modified less than a minute ago