On Oct 15, 10:06*pm, "David C" <dlch...@lifetimeinc.com> wrote:
> I have a ListView for view/add/edit of a table. If I accidentally hit the
> Enter key while entering data the page jumps to the submit page. Is therea
> way to disable the Enter key to avoid this from happening? *Thanks.
>
> David
<input type="text" onkeypress="return handleEnter(this, event)">
and in js
function handleEnter(field, event) {
var keyCode = event.keyCode ? event.keyCode :
event.which ? event.which : event.charCode;
if (keyCode == 13) {
event.returnValue = false;
event.cancel = true;
}
else
return true;
}
|