Files
alfresco-community-repo/source/web/jsp/close.jsp
Jan Vonka 4828b32ff4 Merged DEV/JASONH to HEAD
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
2009-01-09 13:43:02 +00:00

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>