Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I need to disable back button in IE.
The below code is not working
javascript:window.history.forward(1);

Please help

Guhananth.S
Posted
Updated 12-Dec-10 22:10pm
v3
Comments
Abdul Quader Mamun 13-Dec-10 4:05am    
Change tag.

Here[^] is someone else who wanted it.

Incidentally, You realise that ALT+Left, ALT+Right and BackSpace will still work?
 
Share this answer
 
Comments
Toniyo Jackson 13-Dec-10 5:39am    
Best answer
 
Share this answer
 
XML
<script type="text/javascript" language="javascript">
window.history.forward(1);
document.attachEvent("onkeydown", my_onkeydown_handler);
function my_onkeydown_handler()
{
switch (event.keyCode)
{
case 116 : // F5;
event.returnValue = false;
event.keyCode = 0;
window.status = "We have disabled F5";
break;
}
}
</script>



use it it will work.
 
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