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.
(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk. (3) Double-click the browser. backspace_action preference to display an editing field, and change the value to 2 then press Return or click the blue check mark button to save the change.
Windows: "3-bar" menu button (or Tools menu) > Options. Mac: "3-bar" menu button (or Firefox menu) > Preferences. Linux: "3-bar" menu button (or Edit menu) > Preferences. Any system: type or paste about:preferences into the address bar and press Enter/Return to load it.
Your 'logged-in' status is stored in special cookies. If the cookie is removed, you are logged out. You may be in Private Browsing mode or told Firefox not to remember. Type about:preferences#privacy<enter> in the address bar.
For security reasons, Firefox now ignores the string you return.
There is nothing you can do about it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With