Hello everybody! I have a problem, in IE my code works properly, but Firefox writes "Error: guardMaxLength is not defined" the code is following:
checklength.js
checklength.js
Code:
function guardMaxLength(ta,event)
{
maxlength=parseInt(ta.maxlength,10);
if(ta.value.length>=maxlength)
{
return false
}
ta.value=value;
}
Code:
<script type="text\JavaScript" src="checkLength.js">
</script>
<textarea maxlength="10" onkeypress="return guardMaxLength(this, event)" >
Thanks a lot!