javascript - after closing popup with window.close() and the unload event not firing in IE 11 -
from parent page, have opened popup using window.open.
then in popup, trying close popup window.close , on unload, trigger click in parent page.
code in popup.aspx.cs:
clientscript.registerstartupscript(typeof(page), "closepage", "<script type='text/javascript'>window.close();</script>");
code in popup.aspx
<script type="text/javascript"> window.onunload = triggerclick; function triggerclick() { var b = window.opener.document.getelementbyid('ctl00_pagecontent_updatebutton1'); b.click(); return false; } </script>
it works fine in ff , chrome, not in ie 11. suggestions on how tackle issue? in advance.
try window.onbeforeunload, not window.onunload
.
Comments
Post a Comment