java4all@1986 java. Powered by Blogger.

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>

0 comments:

Post a Comment

FaceBook Login

HTML/JAVASCRIPT

HTML/JAVASCRIPT

HTML/JAVASCRIPT

HTML/JAVASCRIPT

Total Pageviews

STATCOUNTER

  © Blogger template Simple n' Sweet by Ourblogtemplates.com 2009

Back to TOP