If you want to disable going back in the previous page, I am going to show you very easy method to do this:
Suppose you are in Page 1 and go to page 2. If you want to go back to page 1 , you are able to go. But now, if you want to disable that going back features, add the following script in the body tag of the page 1:
body onload=”if(history.length>0)history.go(+1);”
This works only for IE and not for Mozilla Firefox. For Mozilla do this:
add this script within head:
function noBack()
{
window.history.forward()
}
noBack();
window.onload=noBack;
window.onpageshow=function(evt)
{
if(evt.persisted)noBack()
}
window.onunload=function()
{
void(0)
}
It works not only with Firefox but also with IE, Safari, Opera.
Wednesday, April 15, 2009
Subscribe to:
Posts (Atom)