<body id="MyBody" onkeydown="return showKeyCode(event)">
function showKeyCode(e) {
// debugger;
var keycode;
if (window.event)
keycode = window.event.keyCode;
else if (e)
keycode = e.which;
// Mozilla firefox
if ($.browser.mozilla) {
if (keycode == 116 || (e.ctrlKey && keycode == 82)) {
if (e.preventDefault) {
e.preventDefault();
e.stopPropagation();
}
}
}
// IE
else if ($.browser.msie) {
if (keycode == 116 || (window.event.ctrlKey && keycode == 82)) {
window.event.returnValue = false;
window.event.keyCode = 0;
window.status = "Refresh is disabled";
}
}
else {
switch (e.keyCode) {
case 116: // 'F5'
event.returnValue = false;
event.keyCode = 0;
window.status = "Refresh is disabled";
break;
}
}
}
what is "jqcc"? is it related to jquery?
ReplyDeleteinstead of giving $ symble I given jqcc
DeleteVinod the code which you have provided is not working for me. Is there any othere solution.
ReplyDeleteinstead of using jqcc u can use $
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteit's not a good way waste other's time for hit your page
ReplyDeletePlease let me how may I have offended you "Anonymous"
ReplyDeletewill this work for refresh button as well? or just f5. thanks in advance.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteit will work for both cases
ReplyDeletenot working with refresh button .. I need this solution really
ReplyDeleteCan you tell me what error your facing send error screen short
ReplyDeleteRefresh button from browser is not working --Rohit
ReplyDeletedid u get browser refresh button solution
ReplyDeleteits only work for f5 button on keyboard but i want to disable refresh button on the browser window plz help me..
ReplyDeleteSame problem bro
Deleteit is not working for firefox
ReplyDeletenot working
ReplyDeletenot woeking
ReplyDeletenot working for browser refresh button I want to disable refresh button on the browser pls help me.
ReplyDeleteNot working
ReplyDelete