I have a script that if user is uploading file and try to close the browser it will trigger the onbeforeunload() and popup an alert.. I change the message but somehow it does not work in firefox, it works perfectly fine on IE or opera or safari.. the code is something like
window.onbeforeunload = checkUnload;
function checkUnload() {
if (document.upload.isEmailing())
return "Aaaa";
So, in IE and opera, when users close the browser during emailing, it will show pop up saying "AAAA" with leave or stay page button.
However, in firefox, it show
"This page is asking you to confirm that you want to leave - data you have entered may not be saved." with leave or stay page button.
Why it does not work, am I doing something wrong?
Note: FF I am using is the latest version if that will help.