the html tag <textarea> doesn't have a 'maxlength' feature that restricts the number of characters the user can input like the <input> tag does... (unless I am missing something)
So I am sure I need javascript to do this.
so far I have this...
(I want to only allow upto 150 characters in the textarea)
Code: Select all
function bioMax() {
var textareaLen = '';
if (document.forms['addMember'].elements['add_bio'].value.length > 150) {
textareaLen = document.forms['addMember'].elements['add_bio'].value;
}
}Or is there a way to just not allow any more characters?
I don't want to disable it or anything like that because I still want them to be able to edit it or delete or whatever they need to do... just not allow more than 150 characters in the area.
Thanks in advance for your help.