The Little Guy Posted September 7, 2010 Share Posted September 7, 2010 I can't remember how to have a confirmation window display asking if you are sure you want to leave the page, does anyone know how to do this? If they click yes they can leave and if they click no they will stay on the page. Any help would be appreciated! Link to comment https://forums.phpfreaks.com/topic/212728-onunload/ Share on other sites More sharing options...
The Little Guy Posted September 7, 2010 Author Share Posted September 7, 2010 ahh... I am using the wrong event! <script type="text/javascript"> window.onbeforeunload = function(){ return 'Leaving this page will quit playback, are you sure you want to leave?';} </script> Link to comment https://forums.phpfreaks.com/topic/212728-onunload/#findComment-1108114 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.