www.webdeveloper.com
Results 1 to 15 of 15

Thread: turn off email,save,print,etc on photo

  1. #1
    Join Date
    Feb 2004
    Posts
    21

    Question turn off email,save,print,etc on photo

    Hi gang -
    I use a small JavaScript to turn off the R/Click action on my web pages. However, I have a page that display thumbnails. When you click on the thumbnail, an enlargement page appears. See all code below. Anyway, even though I have the R/Click disabled, when the mouse pointer is placed on the enlargement, I still get that darn little box showing a floppy, a printer, an envelope and a file folder and theuser can still copy my photo.

    What's the cure?

    Thanks, bigMike


    Here is a portion of my code:
    function popUp1(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=510,height=260,left = 250,top = 300');");
    }
    function popUp2(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=510,height=322,left = 250,top = 300');");
    }

    After this, my JavaScript to stop the R/Click is placed:
    <script language="JavaScript">
    <!--
    // No rightclick script.
    // Find more great scripts and applets at the JavaFile!
    // http://www.javafile.com
    // Do not delete this header!

    var message="Sorry, we don't allow that on this site!."; // Put your message for the alert box between the quotes.

    // Don't edit below!

    function click(e) {
    if (document.all) {
    if (event.button == 2) {
    alert(message);
    return false;
    }
    }
    if (document.layers) {
    if (e.which == 3) {
    alert(message);
    return false;
    }
    }
    }
    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    }
    document.onmousedown=click;
    // -->

    </script>

  2. #2
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    Luckily, Microsoft have provided us developers with a simple META tag to control the image toolbar in IE6. The following code will explain.
    Code:
    <meta http-equiv="imagetoolbar" content="no" />
    You can also stop the toolbar on a single image by toggling the galleryimg parameter of the <img> element.
    Code:
    <img src="yourImg.gif" galleryimg="no" />
    Regards,
    Andrew Buntine.

  3. #3
    Join Date
    Feb 2004
    Posts
    21
    Thanks, Andrew. Does this hold only for the IE6 and + ??

    Might be better for me to use the galleryimg parameter on all photo's.

    Thanks again,

    bigMike

  4. #4
    Join Date
    Jan 2004
    Location
    Alabama, United States
    Posts
    833
    There is no real way of stopping anyone from getting site code or images. JavaScript can be disabled, and, hence, all the protection with it. The user can always hit [PrintScreen], which cannot be disabled. The only way to keep your photos from being distributed is to not publish them at all.

  5. #5
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    Yes, this works for all versions of IE6. Though, as phill stated, there is no use in trying to stop your visitors from getting images and source code.

    The best method is to watermark your images so they are rendered useless to people who want to steal them.

    Regards.

  6. #6
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    The bottom line is that you CAN'T stop someone from getting a copy of any image on your web site. They had to get a copy to see it in the first place and doing silly things like capturing the r-click will only add about 5 seconds to the time it takes them to get a separate copy.

  7. #7
    Join Date
    Feb 2004
    Posts
    21
    Yeah, I know SOME people could do a screen print and convert or whatever, but MOST people won't know how to do anything about it - I'm happy in stopping MOST people

  8. #8
    Join Date
    Dec 2002
    Location
    Seattle, WA
    Posts
    1,843
    Originally posted by bigmikeSOME people could do a screen print and convert or whatever
    that takes too long i prefer to use view source + cut/paste url + view source + cut/paste url + steal image + laugh at you

    besides i use mozilla and those disable right clicks don't work on it

  9. #9
    Join Date
    Jan 2004
    Location
    Alabama, United States
    Posts
    833
    Fact: Anyone who knows anything about the web will get to your images no matter what you do. If you really are that worried about them getting taken then dont publish them. The best thing that you can do is embed a watermark, then anyone stealing them cant claim them as their own; but that is all that you can do

  10. #10
    Join Date
    Aug 2003
    Location
    In my house
    Posts
    4,004
    Originally posted by PhillMc
    Fact: Anyone who knows anything about the web will get to your images no matter what you do. If you really are that worried about them getting taken then dont publish them. The best thing that you can do is embed a watermark, then anyone stealing them cant claim them as their own; but that is all that you can do
    And that would be the recommended option, rather than disabling right-click, since people use their right-mouse button.

  11. #11
    Join Date
    Jul 2003
    Location
    New York City
    Posts
    2,771
    I've been in the same place with this... and I've found out that even in IE with Javascript enabled, you can use your mouse buttons to get around all those scripts. In the end it simply becomes a great nuisance to the user as I generally hate sites that disable right click. Unfortunately, the vast majority of web users know little, and those little Javascripts would stop some IE users.

  12. #12
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    To get images I can go up to the view tab and view your source, I can go into my cache, I can save the page images an all, Or since I use mozilla I can disable js from my toolbar. If worst comes to worst I could take a screen shot, so even putting the images in applets (which I believe can also be found in cache in a hidden folder in your user documents) or in flash can't stop me. The only way to stop someone from getting your iamges is not to put it on the internet.

  13. #13
    Join Date
    Jan 2004
    Location
    Alabama, United States
    Posts
    833

    If we've said it once ....................

    GIVE UP ON HIDEING THE IMAGES! As Peo pointed out, no matter what you do, we can and will get them. To be honest, placing these 'security' measures on your site is only gonna make me or just about anyone else that much determined to get them all

  14. #14
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    Its fun, when people put anti-right-click scripts on their sites, to email them their source code and call them idiots.

  15. #15
    Join Date
    Jan 2004
    Location
    Alabama, United States
    Posts
    833
    ROFL!!

    I did that with some fool that actually bouught some JavaScript Site Encryption tool. With all the crap that he had up (all toolbars removed, no right click, and only allowed IE to view [DEAR GOD!!]) I S T I L L got his source and sent it to him ( along with a few comments ), he promptly brought down his site. lol.

    This ALONE should tell all that it is IMPOSSIBLE. ALSO, if you disallow any browser from viewing your site then your intelligence rivals only with plant life.

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