1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

one click select text area

Discussion in 'FaceBook' started by Website, May 11, 2010.

  1. Website

    Website Supreme Member

    Joined:
    Feb 8, 2008
    Messages:
    1,291
    Likes Received:
    286
    Location:
    whitehouse
    how do you highlight a text area in FBML with one click? I haven't been able to figure this out
     
  2. scope1993

    scope1993 Registered Member

    Joined:
    Nov 2, 2009
    Messages:
    84
    Likes Received:
    6
    Location:
    UK
    Code:
    
    <script type="text/javascript">
    function SelectAll(id)
    {
        document.getElementById(id).focus();
        document.getElementById(id).select();
    }
    </script>
    
    
    <textarea style="width: 400px; height: 75px;" id="txtarea" onClick="SelectAll('txtarea');">
    
    your shit
    
    </textarea>
    
    
    Works great here.