Don't like ads? PRO users don't see any ads ;-)
Guest

Disable Right Click

By: bingmyass on Apr 27th, 2012  |  syntax: Lotus Script  |  size: 0.83 KB  |  hits: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. 1- Copy this code and put it before head
  2.  
  3.  
  4. <script language=JavaScript>
  5.  
  6.  
  7. var message="Function Disabled!";
  8.  
  9. ///////////////////////////////////
  10. function clickIE4(){
  11. if (event.button==2){
  12. alert(message);
  13. return false;
  14. }
  15. }
  16.  
  17. function clickNS4(e){
  18. if (document.layers||document.getElementById&&!document.all){
  19. if (e.which==2||e.which==3){
  20. alert(message);
  21. return false;
  22. }
  23. }
  24. }
  25.  
  26. if (document.layers){
  27. document.captureEvents(Event.MOUSEDOWN);
  28. document.onmousedown=clickNS4;
  29. }
  30. else if (document.all&&!document.getElementById){
  31. document.onmousedown=clickIE4;
  32. }
  33.  
  34. document.oncontextmenu=new Function("alert(message);return false")
  35.  
  36. // -->
  37. </script>
  38.  
  39. <----
  40. End of code
  41.  
  42.  
  43. 2- If you want to take off the pop up boxes where It says ("alert(message);return false") take off (message) and insert this ("alert;return false")