• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

text field validations

 
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.
 
author & internet detective
Posts: 40198
816
Eclipse IDE VI Editor Java
  • 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.
 
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
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • 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
 
Author
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
 
Marshal
Posts: 67447
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the HTML/JavaScript forum.
 
author
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
 
    Bookmark Topic Watch Topic
  • New Topic