wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes How to disable back button in jsp page using js Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to disable back button in jsp page using js" Watch "How to disable back button in jsp page using js" New topic
Author

How to disable back button in jsp page using js

Ankit Khare
Greenhorn

Joined: Apr 24, 2009
Posts: 4
My jsp page contains simple message and ok button .i dont want user to click on back button and navigate back to last page ..

dose any body have any idea for disabeling back button of IE...
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3816

If you search the forum for text like "disabling back button" you will find a lot of posts discussing it.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Also go through PRG Technique
Pravin Shirke
Ranch Hand

Joined: Apr 05, 2008
Posts: 150

Hi Ankit,
I think You can use Javascript for disabling the browser back button.


Inside the script tag. But this a bad design to disable the browser back button. can i know why do you want this.


[Vipassana] - It is seeing the reality as it is, And not as you want it to be.!!!
SCJP1.5.
Ankit Khare
Greenhorn

Joined: Apr 24, 2009
Posts: 4
basically that page is a result for redirection when license is getting over and if from that page if some one can go back then it can create problem..
Ankit Khare
Greenhorn

Joined: Apr 24, 2009
Posts: 4
what does this function call does::

window.history.forward(1);
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60739
    
  65

Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to disable back button in jsp page using js
 
Similar Threads
How to add back button using JSTL?
setting button size
Show msg while clicking on BACK button that page expired
Getting a return URL
Error uploading file in Mac OS