mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
12240: Prevent Windows WebBrowser control from asking user whether they want to close the window git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12657 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
22 lines
618 B
Plaintext
22 lines
618 B
Plaintext
<script type="text/javascript">
|
|
if ((window.opener) && (window.opener.alfrescoCallback))
|
|
{
|
|
window.opener.alfrescoCallback();
|
|
}
|
|
|
|
// Prevent Windows WebBrowser control from asking user
|
|
// whether they want to close the window
|
|
// See http://dotnetslackers.com/Community/blogs/haissam/archive/2007/04/20/Javascript_3A00_-Close-window-without-the-prompt-message-in-IE7.aspx
|
|
var ie7 = (document.all && !window.opera && window.XMLHttpRequest) ? true : false;
|
|
if (ie7)
|
|
{
|
|
window.open('','_parent','');
|
|
window.close();
|
|
}
|
|
else
|
|
{
|
|
window.opener = window;
|
|
window.close();
|
|
}
|
|
</script>
|