hello there, this is the script
HTML Code:
<html>
<script type="text/javascript">
var bEdited=new Boolean();
function UnLoadWindow() {
if (!(bEdited)) {
return
}
return 'You are sure want to exit from this website?'
}
window.onbeforeunload = UnLoadWindow;
</script>
<body>
<a href="?test=test">test</a>
</body>
</html>
this script is working but the problem is when someone click "test" link on my website all time is show that message, how i can make this to show just if the user close website (tab/browser)
thanks for the help
|