Is it possible to trigger a function when a using closes the browser tab and prevent it from closing instead a popup will ask the user to proceed to other page or continue to close the browser page?
Scenario:
When the user closes the browser tab of a page, then it wont close right away instead a custom popup (possibly html popup) will prompt and ask if continue to close or proceed to other page. So it would have 2 buttons, "Close" and "Proceed to Page".
If it's not possible using HTML popup, prompt would be fine too. But it should be crossbrowser.
By the way, i prefer using Javascript.. So that's my ideal script to make this function work
Thanks :)