www.webdeveloper.com
Results 1 to 3 of 3

Thread: How to disable right clicking in Firefox browser?

  1. #1
    Join Date
    Nov 2003
    Posts
    6

    How to disable right clicking in Firefox browser?

    A little less than five years ago I found the following java script which I've copied and pasted into my pages ever since, to disable right-clicking when those pages are viewed using either IE or Netscape. How do I amend or replace this java script to continue to disable right-clicking by users of IE and Netscape and, at the same time, disable it by users of the new Firefox browser?

    Here's the javascript:

    __________

    <SCRIPT LANGUAGE="JavaScript1.1">
    <!-- Original: Martin Webb (martin@irt.org) -->

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    function right(e) {
    if (navigator.appName == 'Netscape' or 'Mozilla Firefox' &&
    (e.which == 3 || e.which == 2))
    return false;
    else if (navigator.appName == 'Microsoft Internet Explorer' &&
    (event.button == 2 || event.button == 3)) {
    alert("Please respect copyright.");
    return false;

    }
    return true;
    }

    document.onmousedown=right;
    document.onmouseup=right;
    if (document.layers) window.captureEvents(Event.MOUSEDOWN);
    if (document.layers) window.captureEvents(Event.MOUSEUP);
    window.onmousedown=right;
    window.onmouseup=right;
    // End -->
    </script>

    _____________
    Mark Ladenson

    To see my photographs of great jazz artists (taken for the most part at the
    Chicago Jazz Festival), and for the Bird-KLON archive, visit my website:
    http://www.geocities.com/ladenso1/index.html

    I also have two exhibits on allaboutjazz.com about, respectively, the 1990
    and 2002 Chicago Jazz Festivals:
    http://www.allaboutjazz.com/gallery/mladenson.htm

    http://www.allaboutjazz.com/gallery/mladenson2002.htm


    And for excellent photos of Everglades birds visit:
    http://www.msu.edu/user/ladenso1/EvergladesBirds.html

  2. #2
    Join Date
    Jul 2003
    Location
    Los Angeles California
    Posts
    1,045
    1) FireFox is too sexy for this
    2)its stupid

  3. #3
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    3) Wrong forum!

    Please, all JavaScript questions must be asked in the JavaScript forum. Java is NOT JavaScript.

    Regards.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles