DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   JavaScript (http://www.daniweb.com/forums/thread49250.html)

mkumaresh_erode Jul 4th, 2006 2:03 am
JavaScript
 
Can any body help !
I would like to display a message when the user clicks on the "X" button of the browser. for that, I have used onUnload event and in that I am displaying an alert message. This works fine if I click "X". But, even if I refresh the page or if I click any action on the page, same onUnload method is fired. How to restrict my action only to "X" button click?
Thank you,


All times are GMT -4. The time now is 8:26 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC