If you have ever tried to close a window and receive this warning "The page is trying to close the window", this warning message shows up everytime we use window.close(). to solve this issue we have to look at how window.close() works
window.close() looks to the opener window, if it's equal to empty string it displays this kind of message, so to bypass this all you need to is to set the opener to a string and then use the close() function
<script language="javascript">
function CloseWindow()
{
window.opener = 'as'; // Or window.opener = self;
window.close()
}
</script>
Today i passed the Asp.net Exam with a score 981/1000. it feels good when you feel your approaching to the goal you have previously set.
and now i'm finally free to start writing articles.
Happy .Net Coding
Learn How to create a text editor to be used inside your web application for your forums, blogs, chat, etc...
http://aspalliance.com/1092
Best Regards