Skip to main content


 

Symptoms


When "close the browser window" action is used, IE is behaving differently, it does not close right away. It displays a warning message first.
"The web page you are viewing is trying to close this window."

NOTE: on Chrome the window or tab closing works fine.

 

Diagnoses


The issue appears to be expected behavior of Internet Explorer and Firefox.

http://stackoverflow.com/questions/57854/how-can-i-close-a-browser-window-without-receiving-the-do-you-want-to-close-thi

http://blogs.msdn.com/b/rextang/archive/2008/10/17/9002876.aspx
 

Resolution

The suggested workaround is to inject a javascript to the view, see suggested steps below.

-Create a text box "text_box_name"
-Create a data label and add an expression.
-----------------------------------------------
If(text_box_name =00,

<script type="text/javascript">$(document).ready(function() { var browserName = navigator.appName var browserVer = parseInt(navigator.appVersion) if(browserName == "Microsoft Internet Explorer"){var ie7 = (document.all andand !window.opera andand window.XMLHttpRequest) ? true : false if (ie7) { window.open('','_parent','') setTimeout('window.close()', 100) } else { this.focus()self.opener = thissetTimeout('self.close()', 100) } } else { try { this.focus() self.opener = this setTimeout('self.close()', 1000) } catch(e){} try { window.open('','_self','') setTimeout('window.close()', 100) } catch(e){} } })</script>

,
<script></script>
)
-----------------------------------------------
If you set it to "00" then it will close the current window within 100 milliseconds.




 
Be the first to reply!

Reply