Forums

Increase Decrease Size of Comment Box (3 posts)

  1. bk
    Member
    Posted 4 years ago #

    Is it possible to increase and decrease the size of the comment box using Javascript?

  2. RyanBrooks
    Member
    Posted 4 years ago #

    Sure is.

    function increaseNotesHeight(thisTextarea, add) {
    if (thisTextarea) {
    newHeight = parseInt(thisTextarea.style.height) + add;
    thisTextarea.style.height = newHeight + "px";
    }
    }
    function decreaseNotesHeight(thisTextarea, subtract) {
    if (thisTextarea) {
    if ((parseInt(thisTextarea.style.height) - subtract) > 50) {
    newHeight = parseInt(thisTextarea.style.height) - subtract;
    thisTextarea.style.height = newHeight + "px";
    }
    else {
    newHeight = 50;
    thisTextarea.style.height = "50px";
    }
    }
    }

  3. bk
    Member
    Posted 4 years ago #

    Where do I add that?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.