Hi
I'm using the following code to cancel key strokes, which is working fine for most keys. However it does not cancel the Enter key? Can anybody help me cancel this?
I'm using the following code to cancel key strokes, which is working fine for most keys. However it does not cancel the Enter key? Can anybody help me cancel this?
function TP_cancelEvent(e)
{
if(!e) { e = window.event; }
if(e.stopPropagation) { e.stopPropagation(); }
if(e.preventDefault) { e.preventDefault(); }
var editor = $find("<%=RadEditor1.ClientID%>"); //get a reference to RadEditor client object
var theSelectionObject = editor.getSelection();
var theSelectedElement = theSelectionObject.getParentElement();
alert(
'Event Cancelled.\n\ntheSelectionObject.getHtml()\n\n' + theSelectionObject.getHtml());
e.cancelBubble =
true;
e.cancel =
true;
e.returnValue =
false;
return false;
}
