I want to raise an event when a popup window is closed, or preferably, just before closing. I\'m storing the popup window object as an object, but I don\'t know of any way to bi
The jQuery code example for the unload event
$(window).unload( function () { alert("Bye now!"); } );
From the jQuery unload documentation
Edit:
I played around and was not able to get the parent window to be able to set the unload. The only way I could get it to work, was by having the script present in the popup window html. The popup window also needed to load jQuery. I have nothing to base this on, but I believe the unload is being triggered, because essentially the popup window is being unloaded from the scope of the parent window. Just a guess.