I have parent window (opener) and child (popup)
---------- -------------- | | | | | parent | -----> opens popup | child | | | | | ----------- --------------
Let's say on the parent page I have a js hello() function
So that the child calls parent hello () when the child window is closed and also passes an argument, I can do
window.close(); window.opener.hello(someArgument);
This will close the window and also call parent hello ();
But what if I don't want to have window.opener.hello () code on the child page? I want to say that I want the code to only be on the parent page
One thing I can think of is:
A few parents know when the child is closed (listenr event ??? not sure about js) But in this case, how to get the argument? (i.e. some data back from the child)
masato-san
source share