Need Java Guru Help

Discussion in 'JavaScript' started by topexnews, Aug 23, 2010.

Thread Status:
Not open for further replies.
  1. #1
    i add following Java Scrips to protect my site from using copy with right click mouse, highliting text and copy. :


    first script

    <script type="text/javascript">
    var omitformtags=["input", "textarea", "select"]
    omitformtags=omitformtags.join("|")
    function disableselect(e){
    if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
    return false
    }
    function reEnable(){
    return true
    }
    if (typeof document.onselectstart!="undefined")
    document.onselectstart=new Function ("return false")
    else{
    document.onmousedown=disableselect
    document.onmouseup=reEnable
    }
    </script>



    second script

    <script language="JavaScript">
    <!--
    var message="";
    function clickIE() {if (document.all) {(message);return false;}}
    function clickNS(e) {if
    (document.layers||(document.getElementById&&!document.all)) {
    if (e.which==2||e.which==3) {(message);return false;}}}
    if (document.layers)
    {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
    else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
    document.oncontextmenu=new Function("return false")
    // -->
    </script>


    have 2 things:

    can be done something to make them better? and does Java Scripts are blocking from text being crawled by googlebot?


    thank you,
     
    topexnews, Aug 23, 2010 IP
  2. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    No it will not stop it from being crawled and no matter what you do it is not possible to stop people from copying text or images.
     
    camjohnson95, Aug 23, 2010 IP
  3. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #3
    HTML is an open source. Everything gets downloaded by the user. It is impossible to protect something that's already in their computers..
     
    Rainulf, Aug 24, 2010 IP
  4. dfsweb

    dfsweb Active Member

    Messages:
    1,587
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    88
    #4
    Hi,
    I agree with the other two here ... you can't stop people from downloading images off your website ... you can use these scripts to make it tough to do for the standard web surfer but it'll still be very easy for someone with a little bit of knowledge about how things work. If you are worried about protecting images, one way is to put a watermark on the images so that at least it's obvious they are yours ... again, unless you put a watermark right across the image, it can easily be cropped out.
    dfsweb
     
    dfsweb, Aug 24, 2010 IP
  5. topexnews

    topexnews Active Member

    Messages:
    333
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #5
    please close this thread
     
    topexnews, Aug 24, 2010 IP
Thread Status:
Not open for further replies.