I have found a way!!! :D
This way works with images INDIVIDUALLY, which is actually better. And its only 1 line of code......
Take your image tag:
<img src="mypic.jpg" height="24" width="100">
Add the following event handler to the end of your tag:
onContextMenu="return false;">...
All i want to do is stop people right clicking on my images, and i cant use a FULL disable right click option because there are songs on my php for people to right click and save as.
A nice quick way to do tht will be great thanx
I don't want smart asses to start telling me this is useless since people can disable javascripts.
Spot on m8, i dont care if people can get the images any other way, its harder for them and time wasting if they want to get the images that way
document.oncontextmenu=new Function("return false")
that line is used to remove the alert from "everything" disabled, puzzling stuff lol.
yer hopefully someone cracks it.
Same Problem
Hey i have the same problem as tdsii, im after a script to disable right clicking ONLY on images WITHOUT the alert and for the script to effect ALL images.
There is this code i found which disables right clicking ALL images but it has the alert on it aswell? is there some way to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.