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 VatsaRank #14 · 51.7K reputationPosted Jun 6, 2011, 1:30 AM EDT
use this
Suthish NairRank #92 · 22.8K reputationPosted Jun 6, 2011, 2:42 AM EDT
Anusha Srivastava41 reputationPosted Jun 6, 2011, 10:55 PM EDT
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 7, 2011, 3:45 AM EDT
What does it mean?
Anusha Srivastava41 reputationPosted Jun 7, 2011, 3:58 AM EDT
Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Jun 7, 2011, 6:10 AM EDT
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.