Forum Moderators: open
Drag and drop functionality is browser specific - so a scripted solution, if even possible, is going to be very labor intensive.
How about serving the images as a div's background image, and then fill the div with a transparent gif or png? That way the "real" image is still visible, but all the visitor can drag around is the transparency.
[edited by: tedster at 4:46 am (utc) on Feb. 1, 2009]
The short answer:
The slightly longer answer:
No
now that im done complaining, here's the solution...
using javascript event handler, watch for the events 'dragstart' for ie and 'mousedown' for anything else on the images you don't them to be able to drag. trap the event and do something like return false on it.
event handling is a bitch, unless you're using a JS framework (Prototype, jQuery, MooTools, etc).
example in prototype:
img.observe('mousedown', Event.stop);
img being the image object to stop the drag. To stop all images, either loop through "document.images" or use Element#delegate for Prototype:
document.delegate('mousedown', {'img': Event.stop});