faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

64 of 219 people (29%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How to disable keys 'print screen','F5','ctrl','alt' & right click of mouse in NN4.5&above?

Apr 5th, 2008 20:40
ha mo, Sundar Rao, Colin Fraser, shital peddi,


This feature is not supported in Netscape. However, you can add a 
script that takes captures the right click in Navigator 6.1 and I am 
sure that no earlier browser supports it:
 <script> <!--//hide
 function myrClick() { 
alert("I have the click"); 
} //unhide --> 
</script>
 <body onRightClick="myrClick()">
 I am pretty sure this will work in IE5+ as well but no other browser. 
It has only in the last year or two that people realised they would 
want control of these features and it has taken the program producers a 
while to realise that script writers want more control. The real 
problem is just how much control are users prepared to allow script 
writers to have over their window? 
************************************************************************
This feature is not supported in Netscape. However, you can add a 
script 
<html>
<head>
<script language="Javascript">
function setClipBoardData(){
     setInterval("window.clipboardData.setData('text','')",20);
}
function blockError(){
     window.location.reload(true);
     return true;
}
window.onerror = blockError;
</script>
</head>
 <body onload="setClipBoardData();">
</body>
</html>
        ----disable the print screen, ctrl+c and ctrl+v keys 
                                      ---------sundar
*****************************************************************
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com