View Full Version : No right click script II (on images) in head code?

05-22-2009, 08:57 AM
1) Script Title: No right click script II (on images)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/noright2.htm

3) Describe problem: I am using the above script on my site to help our photographers feel a bit more protected against the theft of their images (I know it's not fool-proof but the photographers keep arguing that it would put the majority of people off and they feel better if right-click is disabled and a little copyright message pops up.)
However i've found that because the code has to be put at the end of the page, rather than in the head, if the user is quick they can still right click the image before the page has fully loaded.
Is ther a way this script can be modified so that it can work in the header of the page?

For now I have replaced the code with the geneal no right click script but this is getting complaints from users who are now not able to 'open in new tab' etc.

thanks for your help.

05-22-2009, 09:44 AM
The script should work if you put it in the head section as well.

However, I just want to point out that this script doesn't work well in Firefox (tested in 3.0.10). When an image is right clicked, the alert comes up and when you click OK, the right click menu still shows up so the only thing that it accomplishes to do is to annoy the user. You might want to take that into consideration if you have a large Firefox audience.

Happy coding!