Bear in mind that while Jakobs code allows you to correctly prompt the user,
it does not determine if the user has changed anything in the screen, so you
will need to add in the extra step to ensure that you have this covered.
Also, it will always prompt - even if the user has not changed anything -
which may be a wee bit tedious for an end user. So take the example and
expand on it to get the best out of what is being suggested here.
--
Regards
John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------
"Daniel Walzenbach" <da**********************@freudenberg.de> wrote in
message news:Oy**************@tk2msftngp13.phx.gbl...
Jacob,
Again you helped me and I am really thankful. Have a wonderful day.
Daniel
"Jacob Yang [MSFT]" <ji***@online.microsoft.com> schrieb im Newsbeitrag
news:EK**************@cpmsftngxa06.phx.gbl... Hi Daniel,
Based on my research and experience, we can hook the onbeforeunload
event of the body tag. Here is the sample HTML, please try it.
<HTML>
<HEAD>
<SCRIPT>
function closeIt()
{
event.returnValue = "Any string value here forces a dialog box to \
appear before closing the window.";
}
</SCRIPT>
</HEAD>
<BODY onbeforeunload="closeIt()">
<a href="http://www.microsoft.com">Click here to navigate to
www.microsoft.com</a>
</BODY>
</HTML>
Does it answer your question? If I have misunderstood your concern,
please feel free to let me know.
Best regards,
Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no
rights.