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

text field validations

 
neeha sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai my dear friends

i got a task recently which contains 25 text fields and no field have same value.
please tell me the best and efficient way to validate this problem.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sonds like you want to check none of the 25 fields contain a duplicate value. Do you want to do this in Java or JavaScript? In Java, you could put all the values in a HashSet and see that the size is 25 since the HashSet will remove all duplicates. In JavaScript, I think you'd need to write a loop.
 
Srikanth Nakka
Greenhorn
Posts: 26
Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if it is on web page you can easily done by javaScript
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srikanth Nakka wrote:if it is on web page you can easily done by javaScript


why not in java ? Jeanne Boyarsky mentioned already
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without knowing anything about your environment, whether you want to do it in JavaScript or Java, it's difficult to provide helpful input.

Are they all named the same thing? Are they indexed? Java or JavaScript? Back-end framework or plain old servlets?
 
neeha sharma
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to do it in java script
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64848
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the HTML/JavaScript forum.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read a form field

I hope you can figure out the rest from there.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic