Skip to main content

Posts

Showing posts with the label Disable the Right Click

Disable Right Click in Form by Java Script

Disable the right click in forms using JavaScript  Script : var message="Function Disabled";  function clickIE() {if (document.all) {(message);return false;}}  function clickNS(e) {if  (document.layers||(document.getElementById&&!document.all)) {  if (e.which==2||e.which==3) {(message);return false;}}}  if (document.layers)  {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}  else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}  document.oncontextmenu=new Function("return false") 

Disable the Past Content in Text Box and Disable the right Click

Disable the Past Content in Text Box and Disable the right Click  <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <script language="javascript"> function whichButton(event) { if (event.button==2)//RIGHT CLICK { alert("Not Allow Right Click!"); } } function noCTRL(e) { var code = (document.all) ? event.keyCode:e.which; var msg = "Sorry, this functionality is disabled."; if (parseInt(code)==17) //CTRL { alert(msg); window.event.returnValue = false; } } </script> </head> <body> <form method=""> <strong>Not Allow Paste </strong><BR> <input type="text" value="" onMouseDown="whichButton(event)" onKeyDown="return noCTRL(event)"/> </form> </body> </html> OR javascript function noC...