﻿// JScript File
function textCounter(field, countfield, maxlimit) {
var fld = document.getElementById(field);
var ctrfld = document.getElementById(countfield);
//alert(fld.value.length);
if (fld.value.length > maxlimit) // if too long...trim it!
fld.value = fld.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
ctrfld.innerText = maxlimit - fld.value.length;
}

