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

Textbox validation in a .JSP file?

 
abhiavi kumar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there.

My .JSP page consists of these following javascript text boxes cardno, cardname, creditcard and creditcard2



There's a problem with the box "creditcard", I get prompted that the text box is empty, even if I enter values in it (and even if the other boxes are not empty either)

I was also wondering if there's a problem with using Javascript in a .JSP file?
 
abhiavi kumar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Also, How can I prompt the application to say something like "cardno you entered is invalid" by having it check against the values in "cardno" column in a table (oracle)?


 
Vivek K Jain
Greenhorn
Posts: 19
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abhiavi kumar wrote:
Also, How can I prompt the application to say something like "cardno you entered is invalid" by having it check against the values in "cardno" column in a table (oracle)?




for that you need to use Ajax in your form...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NOne of this has anything to do with JSP. This post has been moved to a more appropriate location.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I asked in your other thread, what messages if any do you see in the JavaScript console? Also, remember that JavaScript runs on the client. It cannot access the database. If you want to check server state, you'll need to use AJAX.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic