Bind the below function to keypress event as below
txtJustification.Attributes.Add("onkeypress", "return limitText('" + txtJustification.ClientID + "', 3000);");
function limitText(limitField, limitNum)
{
var obj = document.getElementById(limitField);
if (obj.value.length > limitNum){return false;} else return true;
}
Hope this helps
Open Sourcing DOS 4
3 weeks ago
No comments:
Post a Comment