Results 1 to 2 of 2

Thread: No right click script II (on images) in head code?

  1. #1
    Join Date
    Jun 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow No right click script II (on images) in head code?

    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.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    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!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •