title: Alert Message on event
body: <p>I am looking for a way to change the following javascript so that when a user clicks on right button, it shows a custom message in alert box. </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function mousedwn(e) { 
  try { if (event.button == 2||event.button == 3) return false; }  
  catch (e) { if (e.which == 3) return false; }
  
  }
      document.oncontextmenu = function() { return false; }
      document.ondragstart   = function() { return false; }
      document.onmousedown   = mousedwn;
      &lt;/script&gt;
  </code></pre>