简体   繁体   中英

populating drop down values dynamically based on previous drop down values

I have 3 drop downs, each drop down will be populated from database

Initially when the page is loaded, the first drop down is loaded with the values from database. Later, when any of the option is selected, then the second drop down values to be populated Similarly, when the second the selected, the third drop down values has to be populated

To implement the above I want to use Spring MVC, Ajax and Jquery Can any one help me or let me know how to proceed

Thanks in advance

you can divide this to small parts

  1. create drop dropdown list in spring you can see this link spring-mvc-dropdown-box-example

  2. Put listener on first dropdown when it select call spring controller using ajaxs and this return options values for second dropdownlist.use jquery to add these options in second drowpdown. ynamically-populate-drop-down-list-in-spring-mvc

  3. do the previous step with second and third dropdown

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM