When a window is opened with script and the url contains xml content parsed to html by xslt, the close() command will still fire the confirmation dialog box!
MAG: Is there a workaround for this? How to close a window in this manner on a page parsed by xslt in script without getting the confirmation dialog box?
Yes! You can bypass this bug by replacing the current window with a standard html page that just closes itself: eg, in your xslt transfromed page instead of self.close() use window.open('ieclose.htm','_self');
ieclose.htm looks like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<title>closing</title>
</head>
<body onload="self.close()">
</body>
</html>
You can also try:
window.open('','_self');window.close();
It worked for me.