I have a function that runs on the onUnload event..
when I refresh the page the function executes correctly, However, when I click the back button, the function begins to execute(I have set up alerts throught the function) and appears to get.
the function calls the click event of a button...
document.all.savechanges.click()
I put an alert in the onclick() event of the button. When you go back, it does not fire. When you refresh everything works fine. Is this an IE bug. below is my function.
function saveall(){
if(total !=0){
if(confirm("do you want to save"
){
//alert here works fine
document.all.savechanges.click(); //for some reason this does not work
//alert here works fine
return false;
}
}
}
the variable total is set within the page
any help or comments would be appreciated
tsmith
when I refresh the page the function executes correctly, However, when I click the back button, the function begins to execute(I have set up alerts throught the function) and appears to get.
the function calls the click event of a button...
document.all.savechanges.click()
I put an alert in the onclick() event of the button. When you go back, it does not fire. When you refresh everything works fine. Is this an IE bug. below is my function.
function saveall(){
if(total !=0){
if(confirm("do you want to save"
//alert here works fine
document.all.savechanges.click(); //for some reason this does not work
//alert here works fine
return false;
}
}
}
the variable total is set within the page
any help or comments would be appreciated
tsmith