Win a copy of Learn Spring Security (video course) this week in the Spring forum!
    Bookmark Topic Watch Topic
  • New Topic

How to resolve this issue

 
Shrikanth Nekkanti
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have a dropdown when user selects a value in it immediately another dropdown appears.If user clicks on submit without selecting a value in second dropdown,The second dropdown is disappearing and an error message to enter value in first dropdown is being displayed .

My doubt is How to make First Dropdown stable after selecting a value.When user tries to click submit button without entering a value in second dropdown I wanna display an alert message to user saying to enter city value and how to prevent its disaaperance after click on submit button.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
You can do it with a little JavaScript.

You check for the selectedIndex property of the dropdown box and make a decision.

Just google for the same.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64613
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
 
    Bookmark Topic Watch Topic
  • New Topic