I have a javascript which looks like
function confirmUnload() {
if (event) {
if (event.altKey||event.ctrlKey){
clean();
}
else {
if(event.button==0 && event.clientY<0)
clean();
}
}
}
window.onbeforeunload = confirmUnload;
function clean(){
document.framepageForm.actionParam.value = "logout";
document.framepageForm.action = "signout";
document.framepageForm.submit();
}
The problem is this code works fine in IE7 that is the function clean() is called and the form is submitted. But when I'm using IE6 the same function is getting called and the form is not getting submitted. However if I insert alerts in between ex:
function clean(){
document.framepageForm.actionParam.value = "logout";
document.framepageForm.action = "signout";
alert("step-1");
document.framepageForm.submit();
alert("step-2");
}
Then it works on IE6 too. But I am not allowed to put any alerts.
Could someone please provide me with a solution to this problem.
Thanks in advance.


