Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Protecting Images


stevenrwoolley

Recommended Posts

I think this script would work, but can not figure out where to place it on the site so that it will apply to the entire site.

 

<head>

 

<script language="JavaScript">

<!--

var message="Thank you for visiting my site.";

function click(e) {

if (document.all) {

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

alert(message);

return false;

}

}

if (document.layers) {

if (e.which == 3) {

alert(message);

return false;

}

}

}

if (document.layers) {

document.captureEvents(Event.MOUSEDOWN);

}

document.onmousedown=click;

// -->

</SCRIPT>

 

</head>

 

Any Ideas?

Link to comment
Share on other sites

I have seen several websites that have protection from people right clicking on an image and saving it. I looks like a java script is stopping the right click, but where do you place the script to protect the entire site. Any info would be great.

 

Cheers,

 

Steve

your hosting cpanel should have hotlink protection, mine does, but keep in mind the right click disabled thing will annoy some people that are trying to simply copy and paste simple things like their email addy and other simple things like that. Not all right clicks are to steal your images, watermarks are a better bet, but if you have a load of images that will be time consuming, good luck! :thumbsup:

"I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings."

---Margaret Mead---

 

"The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer.

--Ken Kesey"

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...