Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sign in button

 
anitha vaskarla
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way is to get a focus on your submit button.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also configure the key listener using JavaScript.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Furthermore, its not a JSP question. Html and JavaScript is more suitable place to ask this kinda questions.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic