When I am closing my browser I want a confirmation message.
I am using
window.onbeforeunload = confirmExit;
function confirmExit() {
return "You will Lost this test. Are you sure you want to exit this page?";
}
But this function is also working on page postback on my page.
I want this message on window cclose only
What should I have to do.????