How a function in window A got triggered when window B is close?
<p>Could you please give me an example how a function X got triggered in window A when window B is closed.  For example, window A is launched first, and a button in window A is pressed, then window B is open and does something...then close window B.  As soon as window B is closed, the focus shifts to window A.  At this time, I would like a function X in window A is executed.  Plesae let me know how to do this in Javascript.</p>
