p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Professional (http://p2p.wrox.com/forumdisplay.php?f=63)
-   -   Disabling browser's window "X" button (http://p2p.wrox.com/showthread.php?t=1429)

farhanzia July 9th, 2003 09:33 AM

Disabling browser's window "X" button
I have a web form in asp.net which holds a close button. I need to know that if there is any way that I can force the user to only close the window through that close button. Behind the button I have called java script "window.close();" after some of my own stuff. My problem is that the user can also close the window through the right top "X" button of browser. Is there any way I can disable or somehow make it non-working? That way I will be sure that the page is always closed through close button provided on the page. Any help will be appreciated.

David Cameron July 9th, 2003 06:29 PM

You can't. There may be some way of avoiding this, however none of the solutions would be foolproof. The simple answer is you have to expect that people are going to click the X and you need to write your code with that in mind.

David Cameron

All times are GMT -4. The time now is 02:05 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.