tags:

views:

46

answers:

2

I've just been listening to music in http://listen.grooveshark.com/ website and tried to refresh the page and then it gave me message "Do you really want to refresh this page?". How is this done?

A: 

It probably uses the window.onunload event:

https://developer.mozilla.org/en/DOM/window.onunload

slebetman
+1  A: 
window.onbeforeunload
Paul Creasey
Actually it is not exactly what I'm searching for, because now it always gives me an error when I click on link. I want that it only would gave me it, when I refresh the page.
hey