I have the html page, first.hml:
CODE
<HTML>
<HEAD>
<TITLE>MyFirstPage</TITLE>
</HEAD>
<script LANGUAGE="Javascript">
if(window.navigator.appName == "Microsoft Internet Explorer" && window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE") + 5, window.navigator.appVersion.indexOf("MSIE") + 8) >= 6)
window.location.replace("/second.html")
else
window.location="/index_no_IE.html"
</script>
<BODY>
</BODY>
</HTML>
<HEAD>
<TITLE>MyFirstPage</TITLE>
</HEAD>
<script LANGUAGE="Javascript">
if(window.navigator.appName == "Microsoft Internet Explorer" && window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE") + 5, window.navigator.appVersion.indexOf("MSIE") + 8) >= 6)
window.location.replace("/second.html")
else
window.location="/index_no_IE.html"
</script>
<BODY>
</BODY>
</HTML>
If client uses IE 6+ he will get the second.html, not in new window, but in the same window, first.html will be replaced by second.html:
CODE
<HTML>
<HEAD>
<TITLE>MySecondPage</TITLE>
</HEAD>
<body onblur="self.close()">
<B>
This is The Second Page!
</B>
</BODY>
</HTML>
<HEAD>
<TITLE>MySecondPage</TITLE>
</HEAD>
<body onblur="self.close()">
<B>
This is The Second Page!
</B>
</BODY>
</HTML>
I want the page to be closed if user goes to another window, or any other application, if user does switch to anything else.
Because of that, I did insert <body onblur="self.close()"> into the second.html
But I got the question:
The Web page you are viewing is trying to cloce the window.
Do you want to close this window?
Is there any possibility to avoid the question? To close the window without the question?


