0

I know, that Opera doesnt support JS onbeforeunload message and will not support it. But is there any way to make it work somehow? Or maybe some jQuery plugins can make it work and let script know if window is going to close? I found only way to make onclick for every a tag, but this is not the complete solution.

Peter
  • 159
  • 1
  • 4
  • 10

2 Answers2

3

Upgrade to Opera 15. onbeforeunload is now supported in that version because they moved to the WebKit engine. It is still not supported in 12.x because that version and all prior versions are based on Presto.

wojo
  • 11,061
  • 4
  • 22
  • 21
  • It seems that this event fires correctly in Opera 15 when navigating to a new page, or when refreshing the current one, but it does not fire when closing a tab (which it does in Chrome et al). – Dylan Parry Jul 31 '13 at 14:06
0

It is not possible to use onbeforeunload with Opera. There is a cross-browser solution, but that solution covers practically every big browser except Opera (IE, FireFox, Safari, Chrome).

This explains unbeforeunload and beforeunload a bit better: http://help.dottoro.com/ljhtbtum.php

Also, this post explains it with a better example: Crossbrowser onbeforeunload?

Community
  • 1
  • 1
Brian
  • 529
  • 2
  • 7
  • 17