#basket
New messages Members Forum rules Search RSS
Page 1 of 11
Forum » For webmasters » HTML / CSS / Javascript » Blocking right mouse button
Blocking right mouse button
UndisPutedDate: Sunday, 24.02.2013, 02:45 | Message # 1
Group: Verified
Posts: 245
Awards: 4
Status: Offline
Installation
Between < head > and < / head >

Code
<script language=javascript>          
    <!--          
    var message="The right button is disabled!";          
    function click(e) {          
          if (document.all) { // IE          
          if (event.button == 2) { // To disable the left button, put the figure 1          
          alert(message); // to disable the middle button, put the figure 1          
          return false;}          
          }          
          if (document.layers) { // NC          
          if (e.which == 3) {          
          alert(message);          
          return false;}          
          }          
    }          
    if (document.layers)          
          {document.captureEvents(Event.MOUSEDOWN);}          
    document.onmousedown=click;          
    document.oncontextmenu=function(e){return false};          
    //-->          
    </script><script language=javascript>          
    <!--          
    var message="The right mouse button is disabled!";          
    function click(e) {          
          if (document.all) { // IE          
          if (event.button == 2) { // To disable the left button, put the figure 1          
          alert(message); // to disable the middle button, put the figure 1          
          return false;}          
          }          
          if (document.layers) { // NC          
          if (e.which == 3) {          
          alert(message);          
          return false;}          
          }          
    }          
    if (document.layers)          
          {document.captureEvents(Event.MOUSEDOWN);}          
    document.onmousedown=click;          
    document.oncontextmenu=function(e){return false};          
    //-->          
    </script><script language=javascript>          
    <!--          
    var message="The right mouse button is disabled!";          
    function click(e) {          
          if (document.all) { // IE          
          if (event.button == 2) { // To disable the left button, put the figure 1          
          alert(message); // to disable the middle button, put the figure 1          
          return false;}          
          }          
          if (document.layers) { // NC          
          if (e.which == 3) {          
          alert(message);          
          return false;}          
          }          
    }          
    if (document.layers)          
          {document.captureEvents(Event.MOUSEDOWN);}          
    document.onmousedown=click;          
    document.oncontextmenu=function(e){return false};          
    //-->          
    </script><script language=javascript>          
    <!--          
    var message="The right mouse button is disabled!";          
    function click(e) {          
          if (document.all) { // IE          
          if (event.button == 2) { // To disable the left button, put the figure 1          
          alert(message); // to disable the middle button, put the figure 1          
          return false;}          
          }          
          if (document.layers) { // NC          
          if (e.which == 3) {          
          alert(message);          
          return false;}          
          }          
    }          
    if (document.layers)          
          {document.captureEvents(Event.MOUSEDOWN);}          
    document.onmousedown=click;          
    document.oncontextmenu=function(e){return false};          
    //-->          
    </script><script language=javascript>          
    <!--          
    var message="The right mouse button is disabled!";          
    function click(e) {          
          if (document.all) { // IE          
          if (event.button == 2) { // To disable the left button, put the figure 1          
          alert(message); // to disable the middle button, put the figure 1          
          return false;}          
          }          
          if (document.layers) { // NC          
          if (e.which == 3) {          
          alert(message);          
          return false;}          
          }          
    }          
    if (document.layers)          
          {document.captureEvents(Event.MOUSEDOWN);}          
    document.onmousedown=click;          
    document.oncontextmenu=function(e){return false};          
    //-->          
    </script>




Message edited by UndisPuted - Monday, 25.02.2013, 21:49
 
Forum » For webmasters » HTML / CSS / Javascript » Blocking right mouse button
Page 1 of 11
Search: