How to disable refresh button in your application?
>> Wednesday, June 8, 2011
Copy the below code and paste in our appliction
<html>
<script type="text/javascript">
function showKeyCode(e)
{
alert("Inside function showKeyCode(e)");
var keycode =(window.event) ? event.keyCode : e.keyCode;
if(keycode == 116)
{
alert("refresh button will not work");
event.keyCode = 0;
event.returnValue = false;
return false;
}
}
</script>
With Body sectiong
<body onKeyDown ="showKeyCode();">
</body>
</html>
<html>
<script type="text/javascript">
function showKeyCode(e)
{
alert("Inside function showKeyCode(e)");
var keycode =(window.event) ? event.keyCode : e.keyCode;
if(keycode == 116)
{
alert("refresh button will not work");
event.keyCode = 0;
event.returnValue = false;
return false;
}
}
</script>
With Body sectiong
<body onKeyDown ="showKeyCode();">
</body>
</html>
0 comments:
Post a Comment