Results 1 to 2 of 2

Thread: Please help me

  1. #1
    Join Date
    Jul 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Please help me

    1) Script Title: Disable select-text script

    Code:
    ///////////////////////////////////////////////
    <script type="text/javascript">
    
    
    /***********************************************
    * Disable select-text script-  Dynamic Drive (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    //form tags to omit in NS6+:
    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>
    ///////////////////////////////////////////////

    3) Describe problem: not disable selection buttons/links (IN OPERA BROWSER)
    Last edited by jscheuer1; 07-14-2012 at 04:43 AM. Reason: Format

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Please help me
    Remove the script from your page. As you've already seen Opera can circumvent it. Other browsers can as well.

    Even if it worked flawlessly in all browsers, users can still get your text anyway if they really want it, so why bother?

    Whenever you add a script to a page, there's always the chance it might mess something else up.

    To summarize, at best it's ineffective. At worst it may cause problems.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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