4

When a user tries to close the browser window a popup box pops up. But the problem with that is, it displays its own popup data. So please let me know how can I customize it content of popup box in "Firefox".

 window.onbeforeunload = function() {
      return "my text";
 };

Here instead of "my text" it is displaying its own data. Note: its working fine in Chrome!

Thank you.

gmo
  • 8,860
  • 3
  • 40
  • 51
Pooja
  • 170
  • 1
  • 1
  • 10

1 Answers1

4

You can't... not in FF

Note that in Firefox 4 and later the returned string is not displayed to the user. See bug 588292.*

The only solution is create a custom modal box and give some CSS style to that DIV (for example...)

Source: developer.mozilla.org

gmo
  • 8,860
  • 3
  • 40
  • 51