47 users online (1 members and 46 guests)  


  Results 1 to 8 of 8

Related

  1. Is it possible to add a link in an alert box?    Forum: Javascript Forum
    Replies: 3
  2. supress browser alert    Forum: Javascript Forum
    Replies: 1
  3. Replies: 3
  4. alert if not using IE    Forum: HTML Forum
    Replies: 1
  5. farewell alert    Forum: Javascript Forum
    Replies: 2
  1. #1
    allstarr
    allstarr's Avatar
    Guest

    Talking javascript alert box

    sign come up and say, "no, you can't take this" or whatever when someone trys to right click and steal a picture off my site?

  2. #2
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel

    Talking

    This goes in the <head>:


    <HEAD>

    <SCRIPT LANGUAGE="JavaScript1.1">
    <!-- 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("Sorry, you do not have permission to right click.");
    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>
    </HEAD>


    Do not think that this stops people, there are lots of ways to work around this.

    Dave



  3. #3
    Allyn's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Aug 2000
    Location
    Calgary, Canada
    Posts
    93

    Talking

    Since I am bored, I'll list them.

    1. View - Source.
    If frames, I get the page of the frame, go there and do it again if I really want to see the code.
    2. Right Clicking enough.
    If you click fast enough after you hit ok, the menu will still pop-up.
    3. Load netscape.
    It doesn't work for netscape.



    ------------------
    Allyn -

  4. #4
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel

    Talking

    Ah grasshoppa, you have no faith...this one DOES work with Netscape.

    But you are correct with the others.

    Dave

  5. #5
    Allyn's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Aug 2000
    Location
    Calgary, Canada
    Posts
    93

    Talking

    Originally posted by Dave:
    Ah grasshoppa, you have no faith...this one DOES work with Netscape.

    But you are correct with the others.

    Dave
    lol, I was close. I know about the IE only one, but never seen a Netscape one.

    ------------------
    Allyn -

  6. #6
    allstarr
    allstarr's Avatar
    Guest

    Post

    I really only meant this for the stupid people just serfing the net, who don't know much about html.

  7. #7
    allstarr
    allstarr's Avatar
    Guest

    Post

    I can't seam to get it too work. You sure everything is right? It's in the head section, and I copy and paisted what you had onto my "website", (if you can call it that, because I haven't even begun to put something useful on it), and nothing happened when I right clicked. Is there something I'm missing?

  8. #8
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel

    Post

    Hmmmm, I tried it and you are correct. maybe there is a javascript guru that may read this and help out. you may want to post this in the script forum too.

    Dave



Tags for this Thread