my dog learned polymorphism*
The moose likes Struts and the fly likes How to resolve the following Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to resolve the following Problem" Watch "How to resolve the following Problem" New topic
Author

How to resolve the following Problem

Shrikanth Nekkanti
Ranch Hand

Joined: Jul 12, 2007
Posts: 48
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.
abhijit Ohal
Ranch Hand

Joined: Mar 10, 2006
Posts: 64
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

Joined: Jul 12, 2007
Posts: 48
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.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to resolve the following Problem
 
Similar Threads
Populating dropdown menu based on another
assign dropdown selected value to a java variable
How to retain value in struts 2 using <s:select></s:select> tag
Resolve this please
How to resolve this issue