I am using a Html editor Control and i want to limit the carectors of this control.
I am able to do this for ity's Html mode but the same script is not running for design mode. the code I am using is the following :
function
alert(content);
wc = content.split(
wr = tw - wc;
alert(
}
idt.innerHTML = wr +
}
countWords() {var a = $find("<%=TxtResponseOne.ClientID%>");var content = a.get_content();var tw = 200;' ').length;if (wr <= 0) {"You can enter only " + tw + "Words Maximum !");var idt = document.getElementById('<%=ROneCount.ClientID %>');" Words Remaining.";Sys.Application.add_load(
alert(designMode);
designPanel.captureInDesign =
countWords();
}
}
});
var editPanel = editor.get_editPanel();var designMode = AjaxControlToolkit.HTMLEditor.ActiveModeType.Design;var designPanel = editPanel.get_modePanels()[designMode];var content = editor.get_content();function(ev) {if (ev.type == "keypress" || ev.type == "keydown") {return true;and the editor sorce is:
<%
Thanks.
Abhimanyu K VatsaPosted Jun 7, 2011, 10:10 AM
Are you trying to count from html view or design view? if html view then, i can't assist you but design view is already running for me. i'm using code-behind as i assisted you above. why don't you try this from code-behind? is there any issue with that? even using alert() is not good here.
Anusha SrivastavaPosted Jun 7, 2011, 7:58 AM
Abhimanyu K VatsaPosted Jun 7, 2011, 7:45 AM
What does it mean?
Anusha SrivastavaPosted Jun 7, 2011, 2:55 AM
Suthish NairPosted Jun 6, 2011, 6:42 AM
Abhimanyu K VatsaPosted Jun 6, 2011, 5:30 AM
use this