Programming C# C++ (7) Delphi (604) Java (8) JavaScript (55) Document (8) Events (8) Strings (3) perl (40) php (12) VBScript (1) Visual Basic (1)
Exchange Links About this site Links to us
|
Can I disable the Refresh button in Internet Explorer
14 comments. Current rating: (6 votes). Leave comments and/ or rate it.
Question: Is it possible to disable the Refresh button in Internet Explorer?
Answer: To our best knowledge, this is not possible.
Comments:
|
|
|
|
why why why why ??????????????????
|
|
|
|
|
Of course it is!
function KeyCache() {
if (window.event && window.event.keyCode == 116) {
window.event.keyCode = 123; //Replaces with F12 button. (Does nothing in IE)
}
}
document.onkeydown=KeyCache()
|
|
|
|
|
Event type load is fired when a page loads. This may also be useful when the refresh button on the menu is clicked.
|
|
|
|
|
|
|
|
|
|
I hope this will help full
just write this code in between <head> ... </head>
<script language='javascript'>
var a=0;
function refresh()
{
if (116==event.keyCode)
return false;
}
document.onkeydown = function (){ refresh(); }
function logout()
{
// write ur code.....
}
window.onunload = function(){
if(a==116)
{
a=0;
return;
}
else if(event.clientX>0 && event.clientY<0)
return;
else if(event.clientX<0 && event.clientY<0)
logout();
}
</script>
contact me : myfriendhari@rediffmail.com
|
|
|
|
|
where is refresh button in ie 7
|
|
|
|
|
In IE7, refresh button is right next to url bar (with arrow icon) jus to left of stop button. (with X icon)
|
|
|
|
|
Where/How does 'a' get it's value to be able to be 116?
window.onunload = function(){
if(a==116)
{
a=0;
return;
}
|
|
|
|
|
pls help me for to disable refresh button ...
|
|
|
|
|
im still confuse i have use this code:
<script language='javascript'>
var a=0;
function refresh()
{
if (116==event.keyCode)
return false;
}
document.onkeydown = function (){ refresh(); }
function logout()
{
// write ur code.....
}
window.onunload = function(){
if(a==116)
{
a=0;
return;
}
else if(event.clientX>0 && event.clientY<0)
return;
else if(event.clientX<0 && event.clientY<0)
logout();
}
</script>
between the head but it wasnt working what cud be the problem then,
|
|
|
|
|
<script language='javascript'>
function document.onkeydown()
{
if ( event.keyCode==116)
{
event.keyCode = 0;
event.cancelBubble = true;
return false;
}
}
</script>
Try it
|
|
|
|
|
But this code doesnt' stop the refresh button on the browser... only on the keyboard.
|
|
|
|
|
1
|
|
|
|
|
yes you are right
|
|