I was asked through email a while back how to disable right click in a blog or site to protect uploaded pictures. I found a code at DynamicDrive.com by Renigade, which does just that. It’s easy peasy to implement. Just copy and paste the following code immediately below the
code of your template.<script language=JavaScript>
<!--
//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</script>
Please note that content in your site or blog can still be copied, even with the code, through highlighting the text and hitting CTRL+C in one’s keyboard. While this code against right clicking will not stop a determined and knowledgeable plagiarist, it does discourage the casual copier. Best thing to do is to watermark your images with your site or blog logo/URL, so that people know where they came from.

































{ 4 comments… read them below or add one }
idol na kita talaga…
hindi na kita bibigyan ng opps hmp
papahirapan mo pa ako na i check ang links kung tama o mali hmp
hmp
hmmp
hmmmmpppppppppppp
infairness, masubukan nga ito
ehehehe
So cute layout you have here sis. I need to disable right click soon. Thanks for the tip.
{ 1 trackback }