Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp login page with normal button, not submitt button

 
alsoumahi alBatal
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi experts , I need to do same as login form of this website , if we can see that wrong entries of username and password shows me alert that I have entered wrong username or password
I have used normal button with ajax , and it is working with me fine , but what I need is to make the normal button activated , so no need the user to click by mouse on the button ,only just hit enter

this is my login form



and this is my ajax



is it possible to make normal button as to be pressed like submit button !!!


thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make it a submit button. There's no reason not to. You can handle the submit event.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This would all also be much much easier with a library like jQuery. Doing your Ajax "by hand" is not something that seasoned developers do. There are too many pitfalls and nuances.
 
alsoumahi alBatal
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Make it a submit button. There's no reason not to. You can handle the submit event.



but how about if I want to mention the alert for wrong entry " you have entered wrong username or password " , under the login form
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about it? Your submit handle can perform any validation that it needs to do.

As this is not about JSP, it's been moved to the HTML/JavaScript forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic