View Full Version : need a pop on close window
Kriti09
08-01-2011, 09:16 AM
I need a message appear on pop up when user try to close window. I tried close.window() but that is not working for mozilla.
JShor
08-01-2011, 05:02 PM
Events when a window is being closed is handled by the onbeforeunload event.
function confirmClose() {
if (confirm("This is an confirm box.")) {
parent.close();
}
else
// User does not want to close the window.
{
}
}
window.onbeforeunload = confirmClose();
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.