I was editing a form this evening and got to a point where I needed to limit the amount of text being entered into a textarea. As always, no matter what you do on the front-end you should always validate your inputs on the backend which I was doing. However, I wanted a simple way to display this limitation to the user. jQuery to the rescue!
As you know, maxlength is not supported in HTML4 and earlier. So of course the first thing I checked was Google. I found a very handy script written by Matt Button that provides just the functionality I needed, and more. You can read about and see the script in action on Matt’s site.
Thanks Matt!

Leave a Reply