Menu
Hi All,
I need to show the alert message when the user close the browser by clicking X button on the window(I mean top right button on the window).
I have done that by using the following code,
if (event && event.clientX && event.clientY < 0) {
event.returnValue=”Are U Sure??”
}
It works fine, here the problem is it shows the alert message with this text, I want to get what the user clicked , OK or CANCEL. Bcos based on that I need to do some business process.
Can anybody know how to get what button user clicked. I tried using confirm , but it didn’t work.
your help will be appreciated.