I have a JavaScript function to stop people right-clicking and stealing my images - however, the event results in an alert box - how can I just stop people right clicking - with nothing happening at all i.e. no right - click menu appearing?
Printable View
I have a JavaScript function to stop people right-clicking and stealing my images - however, the event results in an alert box - how can I just stop people right clicking - with nothing happening at all i.e. no right - click menu appearing?
CAT:
I'd appreciate a copy of that code.
Is it cross browser compatible ?
If you get a response to this concern. Let us all know.
ciao: BOX:EYE ([email protected])
I had a similar problem with some java script I am using to hide the source code for the web pages.
At present I have got it to work under Netscape without showing a dialogue box, but Internet Explorer still shows a box.
As soon as I have sorted this one out I will post the answer.
Neil
You cant do it! don't waste your time on trying. In IE5 it's very easy to hide the right click menu (by using oncontextmenu event) but even if you hide this menu, You have another 1000 ways to get this image/source/component.
there is no way to stop them, but you can slow them down in a pretty simple way. as long as the image is not intended to be a hyperlink you can put an empty div on top of it with no background color. when thay are right clicking they will not be right clicking on your image, but your clear layer.
Thanks for all the suggestions guys - I came up with my own - cause I needed my whole site protected - not just the images - i adapted a piece of code - so now every time you right click, a small blank window appears - annoying and soon stops people. My boss is happy, so I am happy, kinda - i personnally (?) think it is a bit messy - and would prefer something much neater - never mind, i'll continue thinking... https://discussions.virtualdr.com/