[jQuery] window unload, blockUI and IE6

[jQuery] window unload, blockUI and IE6


I'm trying to use the $(window).unload() event handler in IE6 but it
doesn't work. It works fine in Firefox. this is my test code:
---
var waitCallback = function() {
$.blockUI.defaults.pageMessage = "<strong class='large'>Please be
patient...</strong>";
$.blockUI({backgroundColor: '#666', color: '#fff'});
}
$(document).ready(function() {
$("#foobaz").click(waitCallback);
});
$(window).unload(function() {
alert("aaaaaaaaaaA");
$(".blockUI").hide();
});
---
When the user click the foobaz button it does a POST on the server,
the server does some machinery and when it's finished it issues a
redirect on another page.
In Firefox 2.0 the all javascript effect works fine (displays the
blockUI message upon clicking and hide the div when the new page is
loaded, and if the user press the back button the div is gone for
good). This does not work in IE. I inserted an alert() to see if the
unload() event was triggered but it isn't.
Any hints?
--
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair