Click here to Skip to main content
11,573,618 members (62,323 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Revisions
Add your own
alternative version

How to detect browser close when browser [X] is clicked ?

, 2 Sep 2009 CPOL 34.4K 21
Some times we need to detect the Browser Close to perform some operation before quiting from application. Here is a simple way.function CheckBrowser(){ // Check Browser Close [X] , Alt+F4 , File -> Close if(window.event.clientX < 0 && window.event.clientY <0) { wi

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available Yes 2-Sep-09 22:30 Available N a v a n e e t h
1 No 2-Sep-09 22:30 Composing Abhijit Jana

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Abhijit Jana
Technical Lead
India India
.NET Consultant | Former Microsoft MVP - ASP.NET | CodeProject MVP, Mentor, Insiders| Technology Evangelist | Author | Speaker | Geek | Blogger | Husband

Blog : http://abhijitjana.net
Web Site : http://dailydotnettips.com
Twitter : @AbhijitJana
My Kinect Book : Kinect for Windows SDK Programming Guide

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150624.2 | Last Updated 2 Sep 2009
Article Copyright 2009 by Abhijit Jana
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid