Stopping Someone from losing their changes Part II
- From: bbdobuddy <bbdobuddy@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Jul 2005 12:26:02 -0700
Hi,
I was reading this previous post on how to prompt the user if they want to
save their changes before they exit the form.
I found this piece of code but am not sure where to put it
<script language="javascript">
window.attachEvent( "onbeforeunload", Window_OnBeforeUnload ) ;
function ConfirmBeforeUnload()
{
var result = window.confirm("'Are you sure you want to do this?");
if(!result)
{
return(false);
}
}
</script>
At the end i put this statement
Page.RegisterStartupScript("clientScript", strScript)
If the user clicks that they want to save their changes how do I call a
function in my form from the javascript function.
Regards
Brian
.
- Follow-Ups:
- Re: Stopping Someone from losing their changes Part II
- From: Bruce Barker
- Re: Stopping Someone from losing their changes Part II
- Prev by Date: Missing DefaultWsdlHelpGenerator.aspx
- Next by Date: dynamic controls creation issues
- Previous by thread: Missing DefaultWsdlHelpGenerator.aspx
- Next by thread: Re: Stopping Someone from losing their changes Part II
- Index(es):
Relevant Pages
|