Click here to Skip to main content
15,914,924 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to popup an alert when back button is pressed in the browser.Now am disabling back button by using window.history.forward() function.It works fine .But I need to give an alert too when user clicks back button.
Posted

You can look at something like this jQuery plugin.

https://github.com/snikch/jquery.dirtyforms[^]
 
Share this answer
 
Hello ,
You can have a look at the following if you are using asp.net
Disabling the Back Button

A good article is available on javascript to detect refresh button & back button click Handling.

Detct Browser Back Click event

This type of question is there in the articel
Similar Question with log out.

Kindly read the article to help you out
Browser-Back-Button-Click-Eventn

Hope this will help you.

Happy Coding
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900