SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Change height of textarea

    There is a script. It changes height of textarea
    var pres = false;
    function MakeHeight()
    {
    var obj = document.ttt.message;
    if(!pres)
    obj.style.height = 100+"px";
    else
    obj.style.height = 250+"px";
    pres = !pres;
    }
    Would you please tell me how to do that height of textarea
    changes with intervals 100px.
    I mean, first click increase height +100px, second +100px and so on.

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Fort Lauderdale
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function MakeHeight()
    {
      var obj = document.ttt.message;
      obj.style.height = parseInt(obj.style.height) + 100 + "px";
    }

    www.unpossiblemedia.com - A Fort Lauderdale based multimedia company.

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's so easy. Thanks.

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you know "htmlarea" from interactivetools.com?
    Maybe you know how to change "htmlarea" height.
    It would be nice.


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
  •