Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

How to validate country and State

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



Here is my html code for a drop down menu for country and state. corresponding states populates dynamically on selecting a country.
Now i want to validate it in my register servlet how can i do it?? Please help me regarding this asap.
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote: but beware: What about places which don't have a street address? You might have Manor Farm, Great Badding. Name of place, and no street. You have to consider that a valid address here in Britain.



A couple of days ago I tried to register on a site that needed a delivery address. The first field was mandated as the house number but I don't have one; I just have a house name. I tried to use my house name but the field would only accept numerics. Interestingly it would accept a house number of 000000 ! I gave up and went to a different supplier.

(Note: this post is a reply to this one in Sunaina's original thread - Winston)
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sunaina agarwal wrote:Here is my html code for a drop down menu for country and state. corresponding states populates dynamically on selecting a country. Now i want to validate it in my register servlet how can i do it??


Well, as I recall, the selection process puts the selected value in the URL.

Beyond that, the only advice I can give is to use existing standards; and the one for countries and states is ISO-3166 - specifically: ISO 3166-2.

Please help me regarding this asap.


Please EaseUp (←click). Urgency is your problem, not ours; and we're all volunteers here.

Winston
 
Greenhorn
Posts: 3
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Validate the values with by passing parameter through config file and access it in Action class to validate.
reply
    Bookmark Topic Watch Topic
  • New Topic