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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -