Sign in to Community
Sign in to view all badges
Expand my Community achievements bar.
I am trying to figure it out but have a little difficulty.
I have two dropdowns connected to a SQL database (for this purpose DD1 and DD2). I need to be able to make the dropdowns conditional.
Fruit | Color
Apple | Green
Apple | Red
Apple | Purple
Apple | White
Plum | Purple
Plum | Light Purple
Plum | Black
DD1 will ask what the fruit will be. DD2 will ask the color depending on DD1.
Doing the following might help.
1) On the enter/initialize event of DD1, call a servlet that fetches all the fruits. Split and add the fruit items to DD1.
2) Once the fruit is selected from DD1, on the exit or change event of DD1, call another servlet (pass fruit selected in DD1) that fetches the colors of the fruit.
Hope this helps.