Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
83
rated 0 times [  87] [ 4]  / answers: 1 / hits: 124701  / 12 Years ago, sun, january 27, 2013, 12:00:00

I am trying to handle browser back button event but i could not find any solution.



I want to ask user if he clicks on browser back button using confirm box if he chooses ok i have to allow back button action else i have to stop back button action.



Can any one help me in implementing this.


More From » jquery

 Answers
22

Warn/confirm User if Back button is Pressed is as below.



window.onbeforeunload = function() { return Your work will be lost.; };


You can get more information using below mentioned links.



Disable Back Button in Browser using JavaScript



I hope this will help to you.


[#80601] Friday, January 25, 2013, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pranav

Total Points: 693
Total Questions: 119
Total Answers: 119

Location: Greenland
Member since Fri, Jul 31, 2020
4 Years ago
;