How to disable "CTRL + R" using Javascript

2,429 views
Skip to first unread message

Amit

unread,
Jun 1, 2009, 5:44:03 AM6/1/09
to Flex India Community
Hello All,
This is Amit, and i am facing the above subjected
problem, i have disabled the right click and the F5 button but i am
not able to disable the "Ctrl + R" or refresh icon .so please tell me
how to do it.i am working on the important project and i have a
deadline so i have to complete it in a very short time of span.


If you have the solution then please give me, it will help for my
further work.


Thank You.

Regards,
Amit

deepak karma

unread,
Jun 2, 2009, 1:26:27 AM6/2/09
to flex_...@googlegroups.com
My dear friend,
U have mentioned that u have code to disabled F5. In the same manner u write code for R button whose event code is 82.so that ur problem abt ctrl +R problem will soved.
Now ur remaining one major problem is to disable refresh button which is immposible.it's because user cannot disble any control of browser.


<script language="javascript">
function document.onkeydown()
{
if ( event.keyCode==116 || event.keyCode==82)
{
event.keyCode = 0;
event.cancelBubble = true;
return false;
}
}
</script>


Reply all
Reply to author
Forward
0 new messages