At the risk of being called a troll, I thought I'd just ask: Why not use image cloaking? Doing that would prevent users from saving images even better than the right-click disable, as it would also prevent them from saving the image by dragging it from the page to their desktop.
With cloaking, you'd write some css to place a transparent gif directly over the images you want to protect, so that when users tried to save the image, they'd just end up with the transparent image, instead of the one you don't want them to save. This would also cover the ol' drag off the page trick, where the right click option wouldn't. I'm on the anti-disable-right-click side of the fence, obviously, as there are more features in that contextual menu than just 'save this image'. There's also 'bookmark this page', and I'd imagine you'd want your users to have access to that. :) On Jun 29, 11:10 am, Stefano Esposito <[EMAIL PROTECTED]> wrote: > Hi all, > > i've a page with many images on it and i have to disable right click > menu on the images of class 'items' so that's what i do: > > $$('.items').each(function (img) { > img.observe('mousedown', function (e) { > var button; > if (window.event) { > button = e.button; > } else { > button = e.which; > } > > if (button > 1) { > e.stop(); > return false; > } > }); > img.observe('mouseup', function (e) { > var button; > if (window.event) { > button = e.button; > } else { > button = e.which; > } > > if (button > 1) { > e.stop(); > return false; > } > }); > }); > > But right click menu is still working... where's my mistake? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---