hi,
I have written code to check max no of characters entered to textbox like below
<textarea name="textarea" id="txtComments" rows="3" onkeyup='return maxLength(this,"250");' style="width: 940px" ></textarea>
in my js file I have written this function
//to check maximun length of comment
function maxLength(field, maxChars) {
if (field.value.length >= maxChars) {
event.returnValue = false;
var object = "-More than " + maxChars + " characters have been entered.";
errorAlert("error", "Maximum length error", object);
return false;
}
}
it is working fine in IE,but not in firefox and chrome.