Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Disable right mouse button...
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 15 May 2014 :  11:41:07  Show Profile  Visit pierretopping's Homepage  Reply with Quote
Hi all,

Is there a quick way to disable right mouse click on topics posted so it makes it that little bit harder for people to grab images. I know its very easy to get around, but it just might stop one or two people.

Something like <body oncontextmenu="return false;" but not sure if this is the right thing to do, or what file it is best placed in.

Thanks people,

P.

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 15 May 2014 :  12:57:37  Show Profile  Visit HuwR's Homepage
If you do not want your content taken, you should not post it on the web. Modern day browsers can even override JavaScript's ability to disable right click. Tools like Firebug/ Web Dev Toolbar make protection useless.

but the javascript you need is

<script language="javascript">
document.onmousedown=disableclick;
status="Right Click Disabled";
Function disableclick(event)
{
  if(event.button==2)
   {
     alert(status);
     return false;    
   }
}
</script>

and

<body oncontextmenu="return false">
...
</body>


MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 15 May 2014 :  16:37:13  Show Profile
There is also a little in-built tool in Windows that allows users to grab images easy, it is called Snipping Tool located at: "%windir%\system32\SnippingTool.exe" in Windows 7 and 8.

So disabling the right click for the images will not stop them, even if you could not override the JS...

Cheers,

David Greening
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 16 May 2014 :  11:36:28  Show Profile  Visit pierretopping's Homepage
thanks all.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07