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 Jr. VIP Jr. VIP

    Joined:
    Nov 2, 2009
    Messages:
    120
    Likes Received:
    19
    Location:
    UK
    Home Page:
    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.