Side navigation
Ticket #6644: unloadTest.html
File unloadTest.html, 0.8 KB (added by czambran, June 07, 2010 05:54PM UTC)
HTML file that can be used to reproduce the bug
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Geany 0.18" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function unloadWarning() {
return "Leaving?";
}
function cancelUnloadWarning(){
$(window).unbind("beforeunload")
}
$(function() {
$(window).bind("beforeunload", unloadWarning);
$("a").click(cancelUnloadWarning);
});
</script>
</head>
<body>
<a href="unload.html">This page</a>
</body>
</html>
Download in other formats:
Original Format
File unloadTest.html, 0.8 KB (added by czambran, June 07, 2010 05:54PM UTC)
HTML file that can be used to reproduce the bug
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Geany 0.18" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function unloadWarning() {
return "Leaving?";
}
function cancelUnloadWarning(){
$(window).unbind("beforeunload")
}
$(function() {
$(window).bind("beforeunload", unloadWarning);
$("a").click(cancelUnloadWarning);
});
</script>
</head>
<body>
<a href="unload.html">This page</a>
</body>
</html>