Disable Right Click

Page: 1

Author Post
Member
Registered: Jan 2009
Posts: 2
is there a way that i can disable right click whenever they floatbox appears
Member
Registered: Jan 2009
Posts: 2
Or is it possible that my image will be blank.gif and the background image is the actual image?
Administrator
Registered: Aug 2008
Posts: 3382
There's nothing in floatbox that lets you disable right-clickability. Also, some browsers don't allow right click to be disabled via javascript.

Blank.gif would still allow right-click in the context of that image, so it doesn't get you too far even if you could figure out how to insert it into floatbox.

Maybe you want to consider accepting the common wisdom that disabling normal client browser functionality is generally considered a Bad Thing???
Member
Registered: Jan 2009
Posts: 24
Ok, I think you are trying to disable right click so the visitors don't rip off your image. What you might want to do is overlay a transparent gif. So that way, they are only saving the .gif file.

Flickr rules.

On how to do that? Well you might have to create a new div between the navigation and the image (so we don't block out the navigation) and make a background with .gif with full repeat. So even if they do right click, they won't get the image.

Hope that helps. :P
Administrator
Registered: Aug 2008
Posts: 3382
Blocking retrieval of images is futile regardless of approach. You've already allowed browser access so the image is already out there. If you block my right click and I want to save your image, I will just view source and copy the image path into my address bar.
« Last edit by admin on Thu Jan 08, 2009 6:04 am. »
Member
Registered: Jan 2009
Posts: 24
True, that's what most people will do. This is for the n00bs out there who think they can steal someone elses' work and not give them credit. I personally don't like the idea of disabeling the right click, but there has to be some way to protect those images. Maybe he should add an overlay watermark to all of his images (like istockphoto).
czarg
Guest
nothing is full proof.. but if you want to annoy your visitors by disabling right-click or using the context menu by getting images you can place this code in the body tag -

<body oncontextmenu="return false;">

It doesn't work in some browsers but Mozilla/IE works fine...

George

Page: 1