Help - Search - Members - Calendar
Full Version: Block Right Click: Stop Image Theft
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > HTML and CSS
MageOfTyr
Hello people!
Obviously a lot of people use these little scripts to stop you from right clicking on websites/HTML pages etc.
But here's one you can have, use and it will always work on any browser but IE6 or less(and who really uses that wink.gif )

This code may be re-distributed if you wish.

Here it is:

CODE
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
Jacob
You are aware there are methods around this? View > Source and there is nothing to disable that. This may be handy for those idiots who do not know about it but I would say the larger majority of people know how to get images if they want them.
MageOfTyr
QUOTE(NaRzY @ Oct 3 2009, 09:26 PM) *
You are aware there are methods around this? View > Source and there is nothing to disable that. This may be handy for those idiots who do not know about it but I would say the larger majority of people know how to get images if they want them.


I know, I know, it's a harsh world without aspx blocking the source, but it can sometimes make the site look better. Besides, I'm just sharing.
lawny
disabling right click is just pointless firefox web developer toolbar will almost just ignore it and let you view the source code and if the person really wants to get your content and they know what they are doing they would just look in their cache laugh.gif
LancerB1
You can always take a screen capture by using the screen capture key or by using a screen capture program like SnagIt. Another way to annoy your user that wants to copy your image is to have the whole web page having the right click button to create an alert() to block the user from getting access of the right click menu.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.