i need check my textarea maxlength of character. But i need check that by javascript. This is my code
<script>
function checkform(form) {
if(document.filter.myarea.value.length > 255) {
alert("Maxlength is 255!");
return false;
}
return true;
}
</script>
<form method="post" name="filter" onsubmit="return checkform(this);">
<textarea name="myarea">Some text</textarea>
</form>
Why this isn t working ? thank you