Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prompting the user to save work on closing the browser window

Status
Not open for further replies.

lnukala

Programmer
Feb 28, 2001
2
US
Hi,
I have an ASP page with ActiveX controls on it that display reports. The users have write access and I would like to prompt them to save their changes if they hit the close button of the browser. Is there any way that I can do this?

Thanks,

Laksh Nukala
 

<html>
<head>
<script language=&quot;JavaScript&quot;>
function MyExit() {
alert(&quot;did you save your work?&quot;);
}
</script>
</head>
<body onUnload=&quot;MyExit();&quot;>
TEST PAGE
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top