0

I have 2 option in my jsp file. First option comobox,

<select name="firstoption">
    <option value="select">-Select-</option>
    <option value="apple">APPLE</option>
    <option value="android">ANDROID</option>
</select>

and when I select the apple option, the second dropdown will be

<select name="secondoption">
    <option value="select">-Select-</option>
    <option value="iphone">Iphone</option>
    <option value="ipod">Ipod</option>
</select>

If I select the android menu, the second dropdown will be another option list.

can anybody help me with this? thanks. and sorry for my bad english

Vinoth Krishnan
  • 2,925
  • 6
  • 29
  • 34
Diastowo
  • 42
  • 1
  • 10
  • I don't know how many options there will be but using a map of maps should do the trick. – Frank Apr 26 '16 at 08:08
  • do you have any reference link? – Diastowo Apr 26 '16 at 08:09
  • 1
    Generally displaying data from a map is explained in the answer to this [SO-Question](http://stackoverflow.com/questions/1835683/how-to-loop-through-a-hashmap-in-jsp). After selecting the first value you need an ajax call to read the values for the second select. There are a lot of examples around if you google a bit. ;-) – Frank Apr 26 '16 at 08:15

0 Answers0