We have an application that our clients use, that is built in flash (don’t ask, i don’t know why). One of the main problems we’re having at the moment is that clients keep clicking on the back button, from force of habit, which means they leave the app and have to start again. Is there a way with javascript that i can show a confirm box when a user clicks back (or just leaves the page), so the use
![Confirm exit of page](https://cdn-ak-scissors.b.st-hatena.com/image/square/f771afb168331cca98152afeaffa3b655e07d78a/height=288;version=1;width=512/https%3A%2F%2Fglobal.discourse-cdn.com%2Fsitepoint%2Foriginal%2F3X%2F6%2Fd%2F6dbd48feb20de08c7fcc132892f7914911911350.png)