• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stop Textfield from Going Blank  RSS feed

 
Steve Dyke
Ranch Hand
Posts: 1760
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a form on my JSP with a textfield and to buttons. Each button fires separtate javascripts. When a user types text in to the box and then presses the keyboard enter key the text in the box disappears. How can I keep this from happening?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66152
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the enter key initiating a form submission?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!