Tim2680
10-20-2009, 07:33 AM
Ive read and read about this topic across the web.// To stop image theft and copyright infringements with the best solutions to prevent image theft. And seemed to come across the best solution to protect your images is to not post them on the web at all :D.
However the task im trying to accomplish is to stop IE from right clicking and also Firefox from dragging the image to desktop. 90% of my website community are IE and Firefox users. So im comfortable if I secure those two browsers. All in all i know that does not protect the images from another method. But anyhow here is my quesion - I use the following code to stop IE from right clicking but what solution can I add to it to prevent FireFox users from simply clicking and dragging the image to thier desktop? If anyone has any other suggestions would be greatly appreciated as well. Thanks in advance for any help!
<script type="text/javascript">
<!--
function IE(e)
{
if (navigator.appName == "Microsoft Internet Explorer" && (event.button == "2" || event.button == "3"))
{
return false;
}
}
function NS(e)
{
if (document.layers || (document.getElementById && !document.all))
{
if (e.which == "2" || e.which == "3")
{
return false;
}
}
}
document.onmousedown=IE;document.onmouseup=NS;document.oncontextmenu=new Function("return false");
//-->
</script>
</body>
</html>
However the task im trying to accomplish is to stop IE from right clicking and also Firefox from dragging the image to desktop. 90% of my website community are IE and Firefox users. So im comfortable if I secure those two browsers. All in all i know that does not protect the images from another method. But anyhow here is my quesion - I use the following code to stop IE from right clicking but what solution can I add to it to prevent FireFox users from simply clicking and dragging the image to thier desktop? If anyone has any other suggestions would be greatly appreciated as well. Thanks in advance for any help!
<script type="text/javascript">
<!--
function IE(e)
{
if (navigator.appName == "Microsoft Internet Explorer" && (event.button == "2" || event.button == "3"))
{
return false;
}
}
function NS(e)
{
if (document.layers || (document.getElementById && !document.all))
{
if (e.which == "2" || e.which == "3")
{
return false;
}
}
}
document.onmousedown=IE;document.onmouseup=NS;document.oncontextmenu=new Function("return false");
//-->
</script>
</body>
</html>