Popup message when window is cancelled (1 Viewer)

wagae

New member
Local time
Today, 10:15
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
 

wagae

New member
Local time
Today, 10:15
Joined
Jul 5, 2006
Messages
5
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

Top Bottom