<SCRIPT>
str non è definito

<!--
var maxchars=100;

function CheckLength()
{
with (document.form1)
{
chars=appunti.value
if (chars.length > maxchars)
{
alert('Nel campo appunti sono consentiti massimo 100 caratteri!')

chars = str.substr(0,100)

}
}
}
//-->
</SCRIPT>