+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Mar 2001
    Location
    Michigan
    Posts
    31

    html code question

    where would i go about finding out what the html code would be for making it so when someone right clicks on a webpage it pops up a box and dosent let you right click.

    thanks,

    -mbi

  2. #2
    Junior Member
    Join Date
    Apr 2001
    Location
    Idaho
    Posts
    20
    put the below in your head. Works well for netscape and IE but not in opera. As you might or might not know...there are still 2 or 3 ways around right clicking to view source.

    <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' &&
    (e.which == 3 | | e.which == 2))
    return false;
    else if (navigator.appName == 'Microsoft Internet Explorer' &&
    (event.button == 2 | | event.button == 3)) {
    alert("You don't have permission to view the code.");
    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>


    [This message has been edited by Cabinetmaker (edited 07-19-2001).]

  3. #3
    Member Dovaka's Avatar
    Join Date
    Nov 2000
    Location
    Worcester, Ma, USA
    Posts
    213
    i wouldnt even bother with it most people including me get annoyed by that becasue we try to open links in new windows as well as other functions but no matter what you do you can always look at the code or get a picture you cant prevent it but dont annoy your users at the same time that are just trying to make navigation easier

  4. #4
    Member
    Join Date
    Mar 2001
    Location
    Michigan
    Posts
    31
    I was just asking this because i was requested to do this by a company i am doing a webage for.


    -mbi

  5. #5
    Banned qball's Avatar
    Join Date
    Oct 1999
    Location
    Rockaway, NJ 07866
    Posts
    1,730
    Dovaka,

    I agree. Allow ME to configure my OS and browser and mouse, not your webpage. Unless you ask nice and I agree.

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







New Security Features Planned for Firefox 4
Another Laptop Theft Exposes 21K Patients' Data
Oracle Hits to Road to Pitch Data Center Plans
Microsoft Preps Array of Windows Patches
Microsoft Nears IE9 Beta With Final Preview
Simplified Analytics Improve CRM, BI Tools
Android Passes RIM as Top Mobile OS in 2Q
VMware Updates Hyperic System Management
File Monitoring Key to Enterprise Security
LinkedIn Snaps Up SaaS Player mSpoke