Question : TextArea - No Down Scroll

Hi, I'm currently having issues with the No Scroll within a Textarea.

I'd like that if a newline is issued and the word wrap is activated, that it would nicely fit the whole paragraph into the textarea without any scrolling and the textarea would dynamically change its length due to the amount of contents.

Answer : TextArea - No Down Scroll

You want something like this:

if(isIE()) {
text_area.style.height = text_area.scrollHeight + "px";
} else {
text_area.style.height = 0;
text_area.style.height = (text_area.scrollHeight -2) + "px";
}

see http://bytes.com/topic/javascript/answers/615386-dynamically-resizing-height-textarea-known-width
Random Solutions  
 
programming4us programming4us