:: Forum >>
how to cancel onKeyEnter
We are using an Input control that has an onKeyEnter event.
When the onKeyEnter event fires, how can I stop the key right there.
How can I stop the enter key from bubbling up to the document body?
Eric Juvet
Friday, February 8, 2008
I found the answer. This seems to work:
function cancelEvent(event) {
event.keyCode = 0;
event.returnValue = false;
event.cancelBubble = true;
return false;
}
Eric Juvet
Friday, February 8, 2008
This topic is archived.
Back to support forum
Forum search