4

I am using a CMS for my site and am checking if the content has been modified before the location of the window is changed. Now I already know about the

$(window).bind('beforeunload', function() {
     return "dialog message";
});

method, but I found a plugin called Apprise and want to replace the default dialog with one of these. Is this possible?

peterh
  • 11,875
  • 18
  • 85
  • 108
Noah Passalacqua
  • 792
  • 2
  • 8
  • 24
  • I thought you should prevent default action. when calling a normal alert it freezes (pause) the script (it's synchronous). Those custom windows are assync, so the script continues and it moves on to the next page. But you can't prevent the page from unloading. (imagine popups that can prevent themselves from being closed). I'm intrigued..not sure how to solve :) – VDP Aug 17 '12 at 07:10
  • Firefox does not allow to alter message box – Bhargav Rao Feb 10 '16 at 10:43
  • You can't use your own dialog to override the default one, This question has already been asked, and got a good answer [here](https://stackoverflow.com/a/6065085/1592398). – code-jaff Aug 17 '12 at 09:13

1 Answers1

-1

Firefox does not allow to alter message box

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Sameer
  • 1
  • 1