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

Thread: disabling right click :)

  1. #1
    Join Date
    Mar 2008
    Posts
    58
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default disabling right click :)

    lets hope this helps some people:

    Code:
    <!--
    var message="";
    ///////////////////////////////////
    function clickIE() {if (document.all) {(message);return false;}}
    function clickNS(e) {if 
    (document.layers||(document.getElementById&&!document.all)) {
    if (e.which==2||e.which==3) {(message);return false;}}}
    if (document.layers) 
    {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
    else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
    
    document.oncontextmenu=new Function("return false")
    // -->
    if you replace false with true, right click is enabled, if you put it false, right click disabled.

    ofcourse there is ALWAYS a way to get around it (via view>source) but it will stop some people

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Or:
    tools->options->content-> unclick 'enable javascript'...
    Jeremy | jfein.net

  3. #3
    Join Date
    Mar 2008
    Posts
    58
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default

    yeah but most 13 year old wannabe coders wont do that, either way it still helps

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Or annoys people.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

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

    Default

    Hahahahaha. On DD's own forums xD
    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
    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 tech_support View Post
    Which itself is a not so cheap, quasi rip off, in that it does no real good other than to get folks interested in scripting.
    - John
    ________________________

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

  8. #8
    Join Date
    Mar 2008
    Posts
    58
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Default

    yeah i didnt get it from DD, i got it from another site

    www.fkn0wned.com, their index page, i thought it was interesting to make it non right clickable so i posted part of the source here, maybe the user who created that page used this script?

  9. #9
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    A cease and desist notice awaits in that site's future
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. #10
    Join Date
    Jul 2008
    Posts
    102
    Thanks
    36
    Thanked 6 Times in 6 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Which itself is a not so cheap, quasi rip off, in that it does no real good other than to get folks interested in scripting.
    Let me add to this for those who may not know what "Quasi" mean (Like me )

    # quasi(a): having some resemblance; "a quasi success"; "a quasi contract"
    wordnet.princeton.edu/perl/webwn

    # Quasi is indie rock band formed in Portland, Oregon in 1993, consisting of the ex-husband and wife team of Sam Coomes (vocals, guitar, roxichord, various keyboards) and Janet Weiss vocals and drums. ...
    en.wikipedia.org/wiki/Quasi

    # resembling or having a likeness to something
    en.wiktionary.org/wiki/quasi

    The above is a quasi to googles define:keyword feature but its not from there, I swear, whos google never heard of them, you aint seen me, right, where am I. Im not putting up with all of these accusations GOODBYE!


    Dal

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
  •