Advanced Search

Results 1 to 2 of 2

Thread: Disable Right Click

  1. #1
    Join Date
    Oct 2008
    Posts
    60
    Thanks
    2
    Thanked 7 Times in 7 Posts

    Default Disable Right Click

    hello to everyone,
    this is a thread that i wanted posted, because i have read alot of threads and postings about how you cannot disable right click. I know this works because i use it here in iraq and on my website here in the states. I have tried to help people out with this, but sometimes they dont get it working. So here is the code. just place it in the "head" section of your page. Currently it only works in IE and Netscape. Sorry for the people with FF.
    HTML Code:
    <script type="text/javascript">
    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;}
    </script>
    Hope you enjoy

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,639
    Thanks
    42
    Thanked 2,896 Times in 2,868 Posts
    Blog Entries
    12

    Default

    Easily disabled by the user's browser settings in FF. If nothing else, in other browsers, simply disable javascript. Voila!
    - John
    ________________________

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

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
  •