A user that wants to enable it again, will find a way. There's no way to absolutely prevent it.

As far as I know, Opera allows for the contextmenu event to be enabled (wasn't by default last time I checked) but doesn't allow to stop the event.


You can however consider the following:
- If you're trying to protect images from being downloaded through the contextmenu, just make them a CSS background instead of an <img>. This method is on par with disabling the contextmenu (except that the context menu will still show). - Otherwise you can overlay a div on top of the part of the page you're trying to disable it on and capture the mouseclick events on the element.

All I can say is that the few sites I've come across that intercepted the contextmenu event will never get a visit from me again. It's annoying to say the least and I don't understand why anyone would do it. If you want to protect images or files, watermark them in some way, a much better and more secure method anyway.

On 05 Jun 2010, at 17:20, Shane McCarron wrote:

Are there still browsers that don't support the contextmenu event class though?

On Sat, Jun 5, 2010 at 4:40 AM, Johan Arensman <johanm...@gmail.com> wrote:
You can using Event.observe()

Event.observe(window, 'contextmenu', function(event) {
event.stop();
});


On Sat, Jun 5, 2010 at 6:29 AM, ankit.it09 <ankit.i...@gmail.com> wrote:
How to disable right click in a web page using prototype , i mean is
there any method.



Best regards

Peter De Berdt

--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to