Hi,
Inserted function to limit amount of characters in a textarea. Want to add alert to that function that informs users they reached input limit - how do I do it?
Input code:
Inserted function to limit amount of characters in a textarea. Want to add alert to that function that informs users they reached input limit - how do I do it?
Code:
<script language="javascript" type="text/javascript">
function imposeMaxLength(projects, MaxLen)
{
return(projects.value.length <= MaxLen);
}
</script>
Input code:
Code:
<textarea name="projects" id="projects" cols="37" rows="5" onkeypress="return imposeMaxLength(this, 50);">