• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Don't want to submit form on Enter

 
Ryan Waggoner
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,
The enter key is causing me a few problems. Recently to get around this, I have been adding onkeydown="enterTab();" to every control, but that is starting to get kind of annoying.

Do I have any other options?


Thanks!
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This returns false only if the enter key is pressed.

If you have any textarea in the form, then you need to remove the onkeypress from the form and apply it on the appropriate input elements only.>
 
Ryan Waggoner
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic