Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002
    Location
    Lowell, MA.
    Posts
    37

    Script question!

    My daughter has a site with a gallery of some pics, you click on the thumbnails and it opens another browser window with a larger version of the thumbnail.
    She would like to protect the photos from being copied and I downloaded a script that works with the thumbnails, which I don't really care about, but won't work with the larger image. here's the script I downloaded, any help would be appreciated. Oh yea! It doesn't work in Mozilla either but wasn't sure if I could just cut and paste the code for IE and just change the name to Mozilla Firefox would work.

    <SCRIPT LANGUAGE="JavaScript1.1">
    <!--
    function right(mousebutton)
    {
    var msg1 = "Sorry!";
    var msg2 = "Sorry!";

    if (navigator.appName == 'Netscape' && mousebutton.which==3)
    {
    alert(msg1);
    return false;
    }
    else

    if (navigator.appName == 'Netscape' && mousebutton.which==1)
    {
    alert(msg2);
    return false;
    }
    else

    if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2)
    {
    alert(msg1);
    return false;
    }
    else

    if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2)
    {
    alert(msg2);
    return false;
    }
    return true;
    }
    document.onmousedown = right;
    // -->
    </SCRIPT>

    Thanks,
    Peter
    Last edited by PeterV; 02-09-2005 at 01:08 PM.

  2. #2
    Join Date
    May 2002
    Posts
    6,333
    When you open the new window are you using:

    <a href="largerphotopage.html" target="_new">Link to photo</a>

    or:

    <a href="javascript: photoOpenFunction()">Link to photo</a>

    If it is the second example then the new window that pops up will not have the right click script loaded in it. However there are ways to fix that.

    Can you post an example page and I will try to correct it for you.

    (As a final note, the right click script doesnt work against anyone who knows how to click on View->View Source. If you want to properly protect them, watermark the photos)

Posting Permissions

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