jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes Stop Textfield from Going Blank Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Stop Textfield from Going Blank" Watch "Stop Textfield from Going Blank" New topic

Stop Textfield from Going Blank

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1559
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

Joined: Jan 10, 2002
Posts: 63838

Is the enter key initiating a form submission?

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: Stop Textfield from Going Blank
It's not a secret anymore!