I have a textbox, and whenever the value of the box changes, I want to check and see if 20 digits have been entered.
I thought that I would use the onChange event, b
use onKeryPress event
onKeryPress
function CountText(field, maxlimit) { if (field.value.length < maxlimit) // if too long...trim it! { return true; } else return false; }
check my full article on : http://www.codeproject.com/KB/validation/MyTextBox.aspx