• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Find duplicate value in jsp page

 
Rd Dari
Ranch Hand
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all Ranchers,

I am facing a problem with jsp page I have a JSP page and I am checking One filed value(Invoice No)to be unique using servlet(select query)but the disadvantages is that its a big form and
when it goes to the action Servlet then if it find the same value in the database then an alert message (Ok) is going the same page that is right but all fields again need to be fill their values i
want to check on the submit button through javascript but it checking only first value (If i use select qry on the same jsp and validate the page )

how to resolve this problem please tell me
I'll appriciate that

Thanks in advance!!
 
J Srinivas rao
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

use the ajax to perform the validation and display the error message if it is duplicated , using ajax could be better instead of submitting the form
 
Rd Dari
Ranch Hand
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for reply very soon ok i'll try if you have any example can you send me right now

Thanks once again!!
 
Rd Dari
Ranch Hand
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for suggest me I got the solution using ajax and its running successfully on the same jsp page on onkeyup function().........

Thanks once again!!
 
J Srinivas rao
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Better you can perform this operation in onblur event
 
Rd Dari
Ranch Hand
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya its same working on onBlur event......

What exact difference between both please guide me in a best way..

Thanks!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic