Programming C# C++ (7) Delphi (618) Java (8) JavaScript (30) Document (8) Events (8) ExtJS (8) Strings (3) perl (9) php (4) VBScript (1) Visual Basic (1)
Exchange Links About this site Links to us 
|
Can I disable the Refresh button in Internet Explorer
22 comments. Current rating: (8 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:
| You are on page 1 of 2, other pages: [1] 2 | |
|
|
|
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()
|
|
anonymous from India
|
 |
|
|
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
|
|
|
|
|
hi i am aryan please solve the problem that below mentioned code is not working in Firefox Mozilla
<script language='javascript'>
function document.onkeydown()
{
if ( event.keyCode==116)
{
event.keyCode = 0;
event.cancelBubble = true;
return false;
}
}
</script>
|
| You are on page 1 of 2, other pages: [1] 2 |
|