ASP.NET

Grow TextArea Height Along with User Input

There are situations, when you do not want to have scroll bars inside a TextArea. Main reason not to have scroll bars inside TextArea is to make your pages more mobile-friendly.  For example on iPhone Safari scroll bar inside TextArea will not even show up.  Another reason not to have scroll […]

Office and Browsers

Properly Validate TextArea Length (IE vs. Firefox)

Let’s consider this example, where HTML page has a TEXTAREA and an INBOX.  When user types inside TextArea, Inbox should show the length of TextArea string. <script type=”text/javascript”> function TTLength(objTT){ var tt= document.getElementById(‘TXT1’); tt.value = objTT.value.length; } </script> <textarea onKeyDown=”TTLength(this);” onKeyUp=”TTLength(this);” rows=”10″> This Text Area Contains a string With Newline […]