Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

disable back button

 
shivaram bupathi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i disable back button of the browser from my jsp page

i tried using the following code

//Code to disable the Back Button in Internet Explorer
var URL;
var i ;
var QryStrValue;
URL=window.location.href ;
i=URL.indexOf("?");
QryStrValue=URL.substring(i+1);
if (QryStrValue!='X')
{
window.location=URL + "?X";
}

but sometimes it is not working ,
do i need to do any settings/changes in browser?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic