This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Sign in button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Sign in button" Watch "Sign in button" New topic

Sign in button

anitha vaskarla

Joined: Sep 12, 2008
Posts: 6
In my jsp page i used code based on Submit Button

if i use that code it is not effecting when i press Enter key, it is not showing next page,It is effecting when i press Submit button Only.

My Question is I want based on enter key and Submit button, how to do?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
One way is to get a focus on your submit button.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
You can also configure the key listener using JavaScript.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Furthermore, its not a JSP question. Html and JavaScript is more suitable place to ask this kinda questions.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60773

If your submit button is in the form, and it's actually a submit button, an Enter/Return should trigger the submit. What browser are you using and exactly how is your form set up?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Sign in button
Similar Threads
when press key enter then an action is performed ..
Login Page Problem
Submitting with "Enter" from textbox where there are several submit buttons on form
Enter key form submission
invoke js method