How to implement onbeforeunload correctly? [SOLVED]
Posted: Tue Mar 22, 2016 4:31 pm
I am having a tough time trying to figure out how to implement onbeforeunload.
For now I have managed to add it manually after compilation by going in and editing the generated HTML but there must be a better way to do it correctly.
Or am I missing something altogether? Is there some other mechanism to allow me to prevent the user accidentally navigating away?
In testing the users keep hitting the soft buttons (especially on a Samsung) and navigating away. I need to prevent that.
Thanks
RKM
For now I have managed to add it manually after compilation by going in and editing the generated HTML but there must be a better way to do it correctly.
Or am I missing something altogether? Is there some other mechanism to allow me to prevent the user accidentally navigating away?
In testing the users keep hitting the soft buttons (especially on a Samsung) and navigating away. I need to prevent that.
Thanks
RKM