It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Javascript Difference with IE7 & IE6 need help....

Javascript Difference with IE7 & IE6 need help....

Postby devilkiller on Thu Aug 14, 2008 7:42 am

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.
devilkiller
 
Posts: 0
Joined: Thu Aug 14, 2008 7:12 am

Who is online

Users browsing this forum: No registered users and 8 guests