View Full Version : How to create a 'Close page' message for unsaved web form data?

03-20-2005, 06:24 PM
How can I generate a message "Do you really want to move away from this page? You have not saved your data changes" .

... when someone attempts to close a web form page via the Red-X button without submitting / saving thier data first?


03-20-2005, 07:57 PM
I'd think that'd have to do with a more windows problem; like have CGI running in the background. However, if someone finds out, could you tell me as well? I could really use that...

03-27-2005, 02:31 PM
Anyone know how to generate an alert if the page is being closed by the user, before saving data?

03-27-2005, 02:56 PM
<script language=javascript>

function confirmit()
event.returnValue = "Are you sure ??";


<body onbeforeunload="confirmit();">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum