Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
This script doesn't work in Firefox 2 as it seems. I tested it with Wikipedia and a Joomla site. When I close the tab, there is no warning. |
|
|
Just a comment regarding your question... the reason your addEventListener didnt work, is that you have to put the entire function body into that second argument of addEventListener. Putting a reference to your function will not work since it will go out of scope!
window.addEventListener('beforeunload', function(event){...}, true); Just like that, and it should be fine. |