mkumaresh_erode 0 Newbie Poster

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,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.