0

I have a spring-roo application where I need to have three drop-down boxes that populate based on each other. I have an object Search which has the variables criteria1, criteria2, and criteria3 (These are all strings).In my controller I have a long list of these objects.

    Example list
Search(type1, version2, longUrl2)
Search(type1, version1, longUrl3)
Search(type2, version3, longUrl2)
Search(type3, version3, longUrl1)
...

Pretty much the Search object can contain any variation of type, version, and a target Url.

I want three drop down boxes, one for each of these search variables. So as a result the first drop down would contain all the obj.criteria1 in the list, and based on that the second drop down would populate with all the obj.criteria2, where the search object's obj.criteria1 is equal to the current selected criteria1, and as follows the third drop down would populate with all the obj.criteria3, where the search object's obj.criteria1 and obj.criteria2 are equal to the current selected values.

I haven't found any examples of jquery ajax that dynamically populate three drop down boxes. Any help would be appreciated. Thanks in advance.

Bhopewell
  • 57
  • 6
  • Have you tried anything yet? Take a look at [jQuery change event](http://api.jquery.com/change/) and post what code you can get started with. – damian Jul 10 '13 at 14:51
  • My apologies. After reading again, I think this may help you: http://stackoverflow.com/questions/47824/how-do-you-remove-all-the-options-of-a-select-box-and-then-add-one-option-and-se?rq=1 – DevlshOne Jul 10 '13 at 14:52
  • Could you please post an example list of all the `Search` objects? – DevlshOne Jul 10 '13 at 14:59
  • Since I'm going on instinct, take a look at this and see if it's something to get you started..... [jsFiddle 17573763](http://jsfiddle.net/devlshone/RGwz6/19/) – DevlshOne Jul 10 '13 at 15:14

0 Answers0