Wrox Programmer Forums
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 9th, 2003, 09:33 AM
Registered User
Join Date: Jul 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Old July 9th, 2003, 06:29 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I force a browser's window size chrscote Javascript How-To 2 May 27th, 2005 03:13 PM
Browser's BACK Button Problem phungleon Classic ASP Databases 6 May 16th, 2005 03:10 PM
Disabling browser's "X" button farhanzia HTML Code Clinic 4 March 23rd, 2005 01:19 PM
Disabling browser's "X" button farhanzia Javascript 1 July 9th, 2003 10:04 AM

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