Diable the Refresh button !
-
Hi all i want to disable the Refresh button i just addeded javascript function for F5. and it works fine here is my code works fine for F5
"function refresh()"+
"{"+"if (116==event.keyCode)"+ "{"+ "event.cancelBubble = true;" + "event.returnValue = false;" + "event.keyCode = 0;" + "return false;" + "}"+ "}"+ "document.onkeydown = function (){ refresh(); } ");
but i cant diable the icon shown in tool bar for Refresh can some one help me thanks in advance
-
Hi all i want to disable the Refresh button i just addeded javascript function for F5. and it works fine here is my code works fine for F5
"function refresh()"+
"{"+"if (116==event.keyCode)"+ "{"+ "event.cancelBubble = true;" + "event.returnValue = false;" + "event.keyCode = 0;" + "return false;" + "}"+ "}"+ "document.onkeydown = function (){ refresh(); } ");
but i cant diable the icon shown in tool bar for Refresh can some one help me thanks in advance
Try This..!
<Script language="javascript">
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>LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.
-
Hi all i want to disable the Refresh button i just addeded javascript function for F5. and it works fine here is my code works fine for F5
"function refresh()"+
"{"+"if (116==event.keyCode)"+ "{"+ "event.cancelBubble = true;" + "event.returnValue = false;" + "event.keyCode = 0;" + "return false;" + "}"+ "}"+ "document.onkeydown = function (){ refresh(); } ");
but i cant diable the icon shown in tool bar for Refresh can some one help me thanks in advance
-
Hi all i want to disable the Refresh button i just addeded javascript function for F5. and it works fine here is my code works fine for F5
"function refresh()"+
"{"+"if (116==event.keyCode)"+ "{"+ "event.cancelBubble = true;" + "event.returnValue = false;" + "event.keyCode = 0;" + "return false;" + "}"+ "}"+ "document.onkeydown = function (){ refresh(); } ");
but i cant diable the icon shown in tool bar for Refresh can some one help me thanks in advance
jasome wrote:
but i cant diable the icon shown in tool bar for Refresh
Actually you can't. Only thing that you can do(what most banking site does) is you can open this in a new window with no toolbar. Thus the Refresh button never appears. And you just remove the refresh facility from browser and you are done. You should also remove the Right click context menu. You might look into this to disable right click in browser: http://www.codeproject.com/tips/42554/Javascript-hack-to-disable-Right-Click-and-Text-Se.aspx[^] Cheers :rose:
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript