I have a form with two text boxes, one select drop down and one radio button. When the enter key is pressed, I want
form
A much simpler and effective way from my perspective should be :
function onPress_ENTER() { var keyPressed = event.keyCode || event.which; //if ENTER is pressed if(keyPressed==13) { alert('enter pressed'); keyPressed=null; } else { return false; } }