hi richard,
i create a code just try this... i hope it will help you.
here's my code ...........
<h3>Hi corgall you can only input 20 character</h3>
<form name="frm">
<textarea name="body" rows="5" cols="40" onkeypress="checkchar(20)">
</textarea>
</form>
<script>
function checkchar(maxchar)
{
remaining = parseInt(maxchar+1) - document.frm.body.value.length
if(remaining==0)
alert('You character length is 20')
document.frm.body.value = document.frm.body.value.substring(0,20)
document.frm.body.focus()
}
</script>
Good luck