Hi All,
I have to attach OnKeyPress event to the SharePoint multiline column with text type as "Enhance Rich Text". Following is the jscript code that I am using
<script>
var ele=document.getElementById(inpID);
if(ele!=null){
ele.onkeypress=function(){calLen(this);};
}
function calLen(obj)
{
if(obj.value.length>=5){
alert('Cannot exceed character limit 5');
obj.value=obj.value.substring(0,5);
}
</script>
But the event is not get attached.
The things are working fine with SharePoint Multiline TextBox with Text Type as "Plain Text".
Can some one help me to solve this issue...?
Thanks in Advance..
Sachin