I want to be able to know when a user navigates away from the page I have loaded in a window opened by Javascript. For example if I have:
newWindow = window.open('http://www.example.com', 'testWindow');
I want to know when the user navigates away from that page (so unload, onunload, onbeforeunload would all work for me if any could be attached). The new window is from a different domain so maybe there's some same origin policy going on but I've been able to do it with iframes. For example:
<iframe src='http://www.example.com' onload='alert("load");'><iframe>
works just fine but I need to do this for a window, not an iframe.