function txtMsg_TextChanged(sender, eventargs){
if (x==1) oEvent.cancel=true; <------There is no oEvent parm, what do I do?????
}
You are using ValueChanged notice "ed" at the end.. Use ValueChaning event, notice "ing" at the end. This is the event that you can cancel.
For each key stroke validation, you can use the KeyDown event.
-Taz.
eventargs.set_cancel(true);
t5his does not work....neither in the TextChanged or valuechanged event....
function
lblMsg_ValueChanged(sender, eventargs){
var
xid=sender._id;
txt = $find(xid);
ct= txt.get_text();
abbrv = document.getElementById(ctl + "_lblAbbrv");
atxt=abbrv.innerHTML + ': ';
if
(ct.startsWith(atxt))
else
so if a person has text in the WebTextEditor "Mase: Welcome to my club" and tries to change the text by selecting and delting "Mase:" I want to cancel so that this Msg Identifier can not be deleted???
I also need to let the use know upon each text change, either by typing one char or deleting a whole line, how many chars long the text is. I use the TexChanged even for this
it would be best if I could cancel the text_changed event...
please feel free to call if you need more explanaton...thanks for your help
You can use the ValueChanging event to cancel a value change by the user, or if you want to cancel a key stroke then handle the KeyDown event and cancel that. Here is an example.
lblMsg_ValueChanging(sender, eventargs) {
function lblMsg_keyDown(sender, eventargs) {
So, if you want to cancel input after the user is done entering the value then use ValueChanging & if you want to validate each key stroke then use KeyDown.
HTH,
Taz.