I'm reading <<Profession javascript for web developers>>.
I have seen for a Script contain "TextUtil" class and "EventUtil" class, but I dont know where are they from?
code fragment:
Code:
TextUtil.allowChars = function(objTextbox, objEvent, blnBloackPaste){
objEvent = EventUtil.formatEvent(objEvent);
var strValidChars = objTextbox.getAttribute("validchars");
var strChar = String.fromCharCode(objEvent.charCode);
var blnIsValidChar = strValidChars.indexOf(strChar) > -1;
if(blnBloackPaste){
return blnIsValidChar && !(objEvent.ctrlKey && strChar == "v");
}
else{
return blnIsValidChar || objEvent.ctrlKey;
}
}