cross-browser Onunload and Onbeforeunload ? (particularly opera 11)

Posted by user393087 on Stack Overflow See other posts from Stack Overflow or by user393087
Published on 2011-01-13T17:39:01Z Indexed on 2011/01/13 17:53 UTC
Read the original article Hit count: 170

I have a form and I must notice user with alert() on exiting page while there are data in the form that had not been send.

I've read that opera has a lot of problems with this. Opera 11 that is, because I need take into account only last version.

So again, the alert should display on refresh, closing a tab, or closing whole browser. It would be nice to set event directly to the <form> element that would be launched on anything that leads to destroying this element.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about form