...

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



rhettu
03-20-2005, 07: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?

Rhett

suendisra
03-20-2005, 08: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...

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

glenmac
03-27-2005, 03:56 PM
<html>
<head>
<script language=javascript>

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

</script>
</head>

<body onbeforeunload="confirmit();">

hahhahahhahaa

</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum