Issue
I am creating a form where user can fill data. Based upon the user's input and selected options I'm showing the next data to fill using js which works totally fine.
Now what I want is if the user presses the back or exit button accidentally. I want to confirm with the user if he really wants to exit from the current page.
Solution
Try using a confirm dialog to get user confirmation when the beforeUnload event is fired, which gets fired when the document is about to be unloaded from the DOM, which includes browser moving to another page or exiting the website.
Answered By - Darshil Jani
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.