I know that by using this function in java script:
window.onbeforeunload = function(e) {
return 'Please press the Logout button to logout.';
};
It will show the warning message when I press the close window button. But the warning message will ask user to choose between 'stay on the page' or 'leave the page'.
I don't want the user to choose when close window. How do we create the warning message with just OK button?