The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

Opera and unload event at closing the tab

Forums » Opera for Windows/Mac/Linux » Opera browser

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

20. September 2011, 15:11:57

alfabacsi

Posts: 1

Opera and unload event at closing the tab

Hi!

I want to catch the event when the user closes the browser or the tab. I've tried the code below but nothing has happened. I've also tried the onbeforeunload event but nothing. I've checked the javascript error log but nothing. Does Opera support this at all?
What is wrong?

Thanks!

<html>
   <head>
   </head>
   <body>
      <script type="text/javascript">
         window.onunload = function() { alert("unload"); }
      </script>
   </body>
</html>

Forums » Opera for Windows/Mac/Linux » Opera browser