L
Lars Netzel
I really need to stop users from reposting the form with Enter or Return
keys. It bypasses so many onClick validations that nothign works if they use
Enter. I must force the user to CLICK on the "Save" button on my aspx page
and instead totally ignore the Enter Key.
I figured I could use this code
function EnterKeyPress(){ if (window.event.keyCode==13){ alert('No Enter
please'); return false; } }
and call that from
<body onkeydown="javascript:EnterKeyPress();">
But that doesn't work.. sure it triggers but it still makes the page
postback.
OR.. any better solution that I'm not bright enough to think of is welcomed!
please help/
Lars
keys. It bypasses so many onClick validations that nothign works if they use
Enter. I must force the user to CLICK on the "Save" button on my aspx page
and instead totally ignore the Enter Key.
I figured I could use this code
function EnterKeyPress(){ if (window.event.keyCode==13){ alert('No Enter
please'); return false; } }
and call that from
<body onkeydown="javascript:EnterKeyPress();">
But that doesn't work.. sure it triggers but it still makes the page
postback.
OR.. any better solution that I'm not bright enough to think of is welcomed!
please help/
Lars