SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2003
    Location
    Temuco, Chile
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question change textarea size on the fly

    hi all:

    How to change the textarea size of my form on the fly, of course using DOM.

    TIA

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Netherlands
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something like:

    Code:
    document.getElementById("textAreaId").style.width="200px";
    Little bit of this and a liitle bit of that should do the job

  3. #3
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This textbox grows as you type (MSIE only)

    Code:
    <textarea 
    	onpropertychange="if(event.propertyName == 'value') this.style.height=this.scrollHeight">
    </textarea>


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
  •