Hi All,
I need a help..
We are using Infragistics WebHtmlEditor.
Requirement is that, user should not able to enter more than 100 character.When user enter, hundred and first character , the vent should be cancelled and a alert message to user.
So, I tried adding
Can anybody help on this?
Hello,
From ClientSideEvents tag of WebHtmlEditor you can invoke javascript function WebHtmlEditor1_KeyDown.
...
<ighedit:WebHtmlEditor ID="WebHtmlEditor1" runat="server">
<ClientSideEvents KeyDown="WebHtmlEditor1_KeyDown" />
</ighedit:WebHtmlEditor>
The function will look like this:
<script type="text/javascript" language="javascript">
function WebHtmlEditor1_KeyDown(oEditor, keyCode, oEvent) {
if (oEditor.getText().length > 100){
oEvent.cancel = true;
}
</script>
For more inforamtion about client side events you can see this link:
http://help.infragistics.com/NetAdvantage/NET/2008.2/CLR3.5/