Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Re: right mouse problem


Message #1 by "Pawan Gupta" <pawan.gupta@i...> on Fri, 5 Jul 2002 10:39:06 +0530
Although many browsers or those where you can disable Javascript, or even 
Saving a copy and then hacking this out will remove this functionality, so 
don't regard these kinds of solutions as 100% secure, but they are useful 
to stop the casual surfer. just my 2c.

At 12:19 05/07/02 -0700, you wrote:
><SCRIPT LANGUAGE="JavaScript">
>//<!--
>function captureClick(e)
>{
>  if (document.all)
>{
>   if (event.button == 2)
>  {
>  alert("Error");
>  return false;
>   }
>  }
>  if (document.layers)
>  {
>   if (e.which == 3)
>  {
>   alert("Error");
>   return false;
>   }
>  }
>}
>
>if (document.layers) {
>document.captureEvents(Event.MOUSEDOWN);
>}
>document.onmousedown = captureClick;
>// -->
></SCRIPT>
>This is compatible with both NN and IE
>
>
>
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20



  Return to Index