Results 1 to 7 of 7

Thread: Silent right click on images only

  1. #1
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Silent right click on images only

    I'm looking for a script for silent right click on images only. Can anyone help?

  2. #2
    Join Date
    Nov 2008
    Posts
    19
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default

    Code:
    <img src="no-more-leeching.gif" width="250" height="250" oncontextmenu="return false;">
    not to sure if the ; needs to be there

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    be advised, that only works in IE5+. To work across browsers, you'd need to use JavaScript (look here), and then all someone needs to do in order to right-click anyway is disable JS in their browser.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Right click is already silent.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    Quote Originally Posted by jscheuer1 View Post
    Right click is already silent.
    I think the OP means this: http://www.dynamicdrive.com/dynamicindex9/noright3.htm

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Snookerman View Post
    Not really, they specified images only. However, this whole no right click business is stupid. It cannot succeed, as it is preventing the default action of the browser. Oh sure, in some browsers some of the time, and in other browsers never. But at what cost? These sorts of schemes make it hard for others to help you with your code, and sometimes are even responsible for the problem in the first place.

    Given all that, my original answer is truly the correct one.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    Quote Originally Posted by jscheuer1 View Post
    Not really, they specified images only.
    Yes, I know, I thought you didn't know what they mean by "silent right click" so I posted that but I know they want it for images only. Nevertheless, I agree with what you said, preventing right clicks is not recommended.

Tags for this Thread

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
  •