Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: how to disable right click?

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

    Default how to disable right click?

    hi...i'm new here...and i would like to ask about disabling right mouse click.
    how do u do that?can u give me the script?thx..

  2. #2
    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

    Please search the forums for previous discussions of similar topics before posting a question about such a much repeated topic.

    The short answer to your post though is:

    Don't do it to protect your material, it won't. That's what copyright is for. If you want to do it for cosmetic or functionality reasons, be careful as it could mess up other things about your page. Scripts are available in the script library. Go to:

    http://www.dynamicdrive.com/

    and use the search box in the upper right corner, try:

    disable right click
    - John
    ________________________

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

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You can't. There are various scripts available that irritate users with annoying popups every time said user tries to right-click, but there's no way to reliably stop users right-clicking. The knowledgeable ones will just laugh off your attempts.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    but here is the link to no right click
    Please don't mind me. I am just posting a lot of nonsense.

  5. #5
    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

    Don't do it!
    - John
    ________________________

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

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You mean that script's still on DD? I thought it was going to be taken down.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Code:
    <script language="javascript">
    document.oncontextmenu=function() {
    return false
    }
    </script>
    Last edited by mburt; 07-30-2006 at 03:22 PM.
    - Mike

  8. #8
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    What's wrong with the script I put above?

    Twey
    You can't. There are various scripts available that irritate users with annoying popups every time said user tries to right-click, but there's no way to reliably stop users right-clicking. The knowledgeable ones will just laugh off your attempts.
    - Mike

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What's wrong with the script I put above?
    It still doesn't work.

    You're telling me a user can't get past that? In fact, a lot of browsers will simply disallow that by default, so the user would never even know it was there.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    It doesn't let you right-click in IE or Mozilla
    - Mike

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
  •