DelphiFAQ Home Search:

Can I disable the Refresh button in Internet Explorer

 

comments35 comments. Current rating: 4 stars (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.


Content-type: text/html

Comments:

You are on page 2 of 3, other pages: 1 [2] 3
2008-08-29, 01:19:52
anonymous from India  
rating
For IE use that logic if firefox use this logic
window.onkeypress = function (){
return false;
}
2008-08-29, 01:21:17
N.MOHANASUNDAR@GMAIL.COM from India  
rating

For IE use that logic if firefox use this logic
window.onkeypress = function (){
return false;
}


Regards,
Mohanasundar.N
2008-09-10, 16:46:34
anonymous from Norway  
Hopefully the answer is found a long time ago...

anyway disable refresh with window.history.forward(1);

in combination with other script to disable F5, you should also disable ctrl+r.

<script language='javascript'>
//disable right-click
document.oncontextmenu = function(){
window.status = 'Right-click is disabled';
return false;
}

//MSIE6 disable F5 && ctrl+r && ctrl+n
document.onkeydown=function(){
//alert('keycode='+event.keyCode + 'event.ctrlKey='+event.ctrlKey );
switch (event.keyCode) {
case 116 : //F5
event.returnValue=false;
event.keyCode=0;
window.status = 'Refresh is disabled';
return false;
case 78: //n
if (event.ctrlKey) {
event.returnValue=false;
event.keyCode=0;
window.status = 'New window is disabled';
return false;
}
case 82 : //r
if (event.ctrlKey) {
event.returnValue=false;
event.keyCode=0;
window.status = 'Refresh is disabled';
return false;
}
}
}


// diasable back button
window.history.forward(1);
</script>

2008-12-16, 09:24:45   (updated: 2008-12-16, 09:29:37)
[hidden] from Mexico  
Hi, you try hide menubar and buttons in a new window??    

I have the same problem

but I am already working on it
2009-06-03, 02:51:49
anonymous from Delhi, India  
<script language='javascript'>
function document.onkeydown()
{
if ( event.keyCode==116)
{
event.keyCode = 0;
event.cancelBubble = true;
return false;
}
}
</script>
This image was also posted here:
Programmatically call the javascript onchange event handler



Keywords:
2009-06-07, 23:39:12
anonymous from India  
how to disable refresh button and in righclick options also
2009-06-07, 23:39:38
anonymous from India  
how to disable refresh button and in righclick options also
2009-06-07, 23:40:08
anonymous from India  
how to disable refresh button and in righclick options also
2009-09-02, 08:41:38
anonymous from India  



Keywords:
2010-02-17, 03:19:04
anonymous from Philippines  
stghxdfgxdfgxdfgxdfg
sdfszdfzsdf]hgjcfghjf]fyj[fuk[fgyu]gip
hgui;]hjstghxdfgxdfgxdfgxdfg
sdfszdfzsdf]hgjcfghjf]fyj[fuk[fgyu]gip
2010-04-23, 05:01:39
anonymous from India  
3242
2010-04-28, 01:46:36   (updated: 2010-04-28, 01:47:43)
anonymous from Madras, India  


Hi ,
I have issue for loginpage,
Can anyone share ur idea to solve the issue.
My login page contain Username and Password two textbox fields
using Onkeydown to call the function
like
function chk_keys()
{
if(event.keyCode==17)
{

alert('Data copy and paste not allowed');
return false;

}

}
Its working fine but after clicking I couldnot able to copy the page url
Same alert message displayed 'Data copy and paste not allowed'
Regards
vinothkumar
2010-05-23, 01:19:07
anonymous from Pune, India  
rating
ffffffffffffffffffffffff
2011-10-21, 06:18:46
anonymous  
<html>
<head>
<script type='text/javascript'>
function Disable() {
if (event.button == 2)
{
alert('This action is not possible')
}
}
document.onmousedown=Disable;

function checkKeyCode(evt)
{
var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
if(event.keyCode==116)
{
evt.keyCode=0;
return false
}
}
document.onkeydown=checkKeyCode;

</script>
</head>
<body>
</body>
</html>
2011-10-21, 06:22:18
anonymous  
<html>
<head>
<script type='text/javascript'>
function Disable() {
if (event.button == 2)
{
alert('This action is not possible')
}
}
document.onmousedown=Disable;

function checkKeyCode(evt)
{
var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
if(event.keyCode==116)
{
evt.keyCode=0;
return false
}
}
document.onkeydown=checkKeyCode;

</script>
</head>
<body>
</body>
</html>
You are on page 2 of 3, other pages: 1 [2] 3

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: