This is a new blogger hack. Well, i am not sure if its called blogger hack nor i think its new. But i had to start the paragraph with nice line so i said new blogger hack. You gotta problem with that? Okay, lets get to the point. Today we are learing(its learning, actually) to disable the right click on images. Disable the right click, what does it means? Oh, it means that the image can't be saved by clicking save image as which means your images cannot be stolen. Confused? I am sure you are. I am not good at english. So just read the whole post below and know by yourself.

Okay i think now you are known about the meaning of disabled right click and when do we need to disable right click on blog's images. So, if you think that thing is a thing you can too try in your blog then here is the code. Just paste the code below in the END of the page above end /body>tag and you are done. Congratulations, now your images are all safe.





<script language="JavaScript1.2">



/*

Disable right click script II (on images)- By Dynamicdrive.com

For full source, Terms of service, and 100s DTHML scripts

Visit http://www.dynamicdrive.com

*/



var clickmessage="Right click disabled on images!"



function disableclick(e) {

if (document.all) {

if (event.button==2||event.button==3) {

if (event.srcElement.tagName=="IMG"){

alert(clickmessage);

return false;

}

}

}

else if (document.layers) {

if (e.which == 3) {

alert(clickmessage);

return false;

}

}

else if (document.getElementById){

if (e.which==3&&e.target.tagName=="IMG"){

alert(clickmessage)

return false

}

}

}



function associateimages(){

for(i=0;i<document.images.length;i++)

document.images[i].onmousedown=disableclick;

}



if (document.all)

document.onmousedown=disableclick

else if (document.getElementById)

document.onmouseup=disableclick

else if (document.layers)

associateimages()

</script>

If you think this post was just digestible then can you link me back please?

0 comments