ma la funzione non si chiama checklength?? :master: e poi onkeyup che cosa c'entra?
tu perche hai scritto?
codice:
<script>onkeyup=""textCounter(document.getElementById('Admin"&RsSEZ("ID_SEZ")&"').SEZ_TESTO,255);""</script>
io mi baso sulla prima funzione che hai postato ovvero
codice:
function CheckLength(theform, writetext, maxchars) {
if (theform.value.length > maxchars) {
theform.value = theform.value.substring(0, maxchars);
}
else {
writetext.innerHTML = maxchars - theform.value.length;
}
}
semmai
codice:
....
<script>
CheckLength(
document.getElementById('id_textarea'),
document.getElementById('id_elementocontatore'),
'255');
</script>
</body>
</html>
Ciao