2013-10-28 21:40:13 +00:00
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
2022-01-04 15:27:18 +00:00
|
|
|
<title>onunload ajax requests (trac-14379)</title>
|
2013-10-28 21:40:13 +00:00
|
|
|
<script src="../../jquery.js"></script>
|
2016-04-10 19:42:44 +00:00
|
|
|
<script src="../iframeTest.js"></script>
|
2013-10-28 21:40:13 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2013-11-04 14:36:16 +00:00
|
|
|
<form id="navigate" action="../iframe.html"></form>
|
2013-10-28 21:40:13 +00:00
|
|
|
<script>
|
|
|
|
jQuery( window ).on( "unload", function() {
|
|
|
|
var ajaxStatus;
|
|
|
|
jQuery.ajax({
|
|
|
|
url: "../name.html",
|
|
|
|
async: false,
|
|
|
|
complete: function( xhr, status ) {
|
|
|
|
ajaxStatus = status;
|
|
|
|
}
|
|
|
|
});
|
2016-04-10 19:42:44 +00:00
|
|
|
startIframeTest( ajaxStatus );
|
2013-10-28 21:40:13 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
jQuery(function() {
|
|
|
|
setTimeout(function() {
|
|
|
|
document.getElementById( "navigate" ).submit();
|
|
|
|
}, 0 );
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|