Popup message when window is cancelled

wagae

New member
Local time
Today, 11:35
Joined
Jul 5, 2006
Messages
5
--------------------------------------------------------------------------------

Hi everyone

I have a data grid and 2 buttons on a page, when a user cancels the window, i want to displat a popup asking the whethere they are sure they want to cancel.

i currently have

<SCRIPT>
function SaveChanges()
{
event.returnValue = "You will loose all unsaved changes, please update details before closing the window.";
}
</SCRIPT>



i call this function on the body like

<body bgColor="#ffffff" MS_POSITIONING="GridLayout" onbeforeunload="SaveChanges()">



Problem is, this message comes up even when clicking the buttons on the page, which is wrong, i want it to happen only when the user closes/cancels the window. Please help
 
popup when window is cancelled without saving changes

Hi everyone, please help me with this post, thank you..much appreciated
 

Users who are viewing this thread

Back
Top Bottom