I am opening a Javascript popup window using window.open() function and have close button on it .I want to detect the the close event of that window in IE,Firefox and chrome as I want to clear session variables and redirect to some other page. I tried using window.onbeforeunload event but it is executing at every postback. Any suggestions will be appreciated.
I am opening a Javascript popup window using window.open() function and have close button
Share
You need an event handler for that there are just these two one could use. So as you said you will have history back and refresh triggering your event too .
Please view this post
Another solution is that you set popup size to fullscreen and make your own close botton. Im sorry javascript is running out of solutions here :-/