Topic: right click
Does anybody know what is the html coding to block people from RIGHT CLICKING and SAVING IMAGES from website?
You are not logged in. Please login or register.
PunBB Forums → Programming → right click
Does anybody know what is the html coding to block people from RIGHT CLICKING and SAVING IMAGES from website?
<body oncontextmenu=’return false’ ondragstart=’return false’ onselectstart =’return false’ onselect=’document.selection.empty()’ oncopy=’document.selection.empty()’ onbeforecopy=’return false’ onmouseup=’document.selection.empty()’>
or
<script LANGUAGE=”JavaScript”>
function click() { if (event.button==2)
{alert(’sorry’); } } document.onmousedown=click
</script>
Do as you like, but I think blocking right click is useless. If they can see the image it is because they have downloaded it already. Also, remember that lots of people turn java off when browsing.
and if they dont have a way round it theres always good old print screen.
People selling images always have this problem. I think the best solution is to deface the image by placing a transparent copyright symbol right in the middle. I have not seen any other effective method for avoiding unwanted distribution.
water marking is one way...
another way is to create just a transparent image and then use the real image as background=.
this way when they right click they just download the transparent image
this way when they right click they just download the transparent image
And if they use brain, they will have your image in next 10 seconds by looking at source code (not speaking of print screen)
IMO watermark is only solution
Yeah this is not 100% effective but the average illiterate will be disabled.
<SCRIPT language="JavaScript">
var errormsg="Sorry, right clicking has been disabled...";
function mouseclick(evt) {
if (document.layers) rc = (evt.which==3);
if (document.all) rc = (event.button==2);
if (rc) {
alert(errormsg);
return false;
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=mouseclick;
</SCRIPT>
But if you use javascript, by disabling javascript they can take images from your website...
But if you use javascript, by disabling javascript they can take images from your website...
true. If you do not want any images to be stolen, do not upload them on the net.
<!-- No Right Click Code -->
<script type="text/javascript">
//<![CDATA[
<!--
var closeWin="0"; // Do you want to close window (1 for yes 0 for no)
var alertVis="1"; // Do you want to alert the visitor (1 for yes 0 for no)
var message="INSERT YOUR WINDOW WARNING MESSAGE HERE"; // Your no right click message here
// Published at: scripts.tropicalpcsolutions.com
function detail(){
if(alertVis == "1") alert(message);
if(closeWin == "1") self.close();
return false;
}
function IE() {
if (event.button == "2" || event.button == "3"){detail();}
}
function NS(e) {
if (document.layers || (document.getElementById && !document.all)){
if (e.which == "2" || e.which == "3"){ detail();}
}
}
document.onmousedown=IE;document.onmouseup=NS;document.oncontextmenu=new Function("return false");
//-->
//]]>
</script>
<!-- End No Right Click Code -->
Sadly enough, the right click blocker's are now fully pointless, if you're using browsers such as Google Chrome Simple pressing Shit+Ctrl+I will open the browsers Inspect Feature bypassing the whole right click function entirely.
IN Theory, the idea behind the right click protection worked wonders in the old days, but now its come and become useless, and if you're that serious about protecting you're items, don't upload them, and/or get them Copyrighted
What about this?
Use right click disabling js code discussed above to disable right click. In case Javascript is disabled, then
<noscript>
<p><strong>Javascript must be enabled to view this page</strong></p>
</noscript>
So easy, thanks to all
PunBB Forums → Programming → right click
Powered by PunBB, supported by Informer Technologies, Inc.