• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to resolve the following Problem

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a Country drop down when user Selects a value in this field city drop down box appears .
If I select Country and Don't select city Field click on submit button should displays an error saying enter city value.But When I click on submit button city field is disappearing and getting error message enter country value.

How to Resolve this issue.
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use ActionsForm's validate method if you are using struts.
i think when you submit form city's are in request get lost & you are getting errors.
Refer following URL
http://www.hscripts.com/scripts/JavaScript/dynamic-form-event.php
 
Shrikanth Nekkanti
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply abhijit.

U are Right i am using struts.
I am using a validate method in form for validation the thing is when i click on submit button without selecting city immediately this field is being disappeared and country value is been set to default.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Shrikanth Nekkanti:
U are Right


Please use real words when posting to the forums. Abbreviations such as "U" in place of "you" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Something fishy is going on. Are you using any JavaScript on your page? What you describe is not normal behavior. If you posted your jsp, action mappings and validation code then maybe somebody could help out.

- Brent
 
reply
    Bookmark Topic Watch Topic
  • New Topic