www.webdeveloper.com
Results 1 to 3 of 3

Thread: picture help

  1. #1
    Join Date
    Dec 2002
    Posts
    49

    picture help

    Is there a way to keep someone from downloading or copying or saving(whatever) a picture I have on my webpage. You know, so it wont get "save pic as" and all that stuff.

    I was wondering... if so.., can you please post the commands or script for that. I would really appreciate it.

    Thanks..

    war

  2. #2
    Join Date
    Dec 2002
    Location
    Seattle, WA
    Posts
    1,843
    this prevents right clicks; but anyone can still download your graphics.

    <script language="JavaScript">
    var msg="Right Click Disabled!";
    function disableIE() {if (document.all) {alert(msg);return false;}
    }
    function disableNS(e) {
    if (document.layers||(document.getElementById&&!document.all)) {
    if (e.which==2||e.which==3) {alert(msg);return false;}
    }
    }
    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);document.onmousedown=disableNS;
    } else {
    document.onmouseup=disableNS;document.oncontextmenu=disableIE;
    }
    document.oncontextmenu=new Function("alert(msg);return false")
    </script>

  3. #3
    Join Date
    Dec 2002
    Posts
    49

    ok

    thanx buddy.

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