A code to prevent Drag & Drop of images?

Does anyone know a code to prevent drag and drop of images.

I have disabled right click. but now need to disable drag and drop.

Thankyou

Update:

transparency wont work because they are thumbails.

Comments

  • A trick is to put a transparent image over the top of your images.

    Any attempt to drag and drop or right click etc would act on the transparent image.

  • You will never stop people from being able to steal your images from a web page. Let me explain:

    When a user visits a site, they effectively _download_ the HTML and related images to a temporary folder, then the browser renders this to the screen. At this point the user has downloaded the image already - any efforts to stop them at this point or later (with petty right-click blocker scripts which incidentally mostly only work in IE) are completely futile.

    If you care so very much about protecting your images there are only a few _guaranteed_ methods:

    1. Watermark your images so that they are unusable to anyone but yourself. The downside of this is ugly watermarks.

    2. Only give very very small "previews", and charge for the full-size versions.

    3. Don't put your precious copyrighted material in a worldwide public forum (i.e. the internet) in the first place.

    To me trying to block image downloads is like leaving a wallet full of cash lying in the street and trying to find complex methods to stop people stealing it. If it was my wallet, I wouldn't leave it there to begin with.

    Rawlyn.

  • The best place in web to find any code is

    Planet Source Code

    http://www.planet-source-code.com/default.asp

    Try it out, I am sure you will find what you require.

Sign In or Register to comment.