I have 2 combo boxes. I want to display specific data in combo box 2 based on combobox 1 selection.
But I want to make it an ontime selection … so when I press on the option I want from combobox 1 , combobox 2 is filled with data matching this selection.
I tried to put an on click function on combobox 1 options, but it didn’t work when I click on them …
So is there some method to do so ?
Assign the
changeevent handler on the first dropdown, and then, based on the selected value, fetch the values that ought to be put in the second dropdown. Here’s a typical manufacturer -> model example:Markup:
JavaScript:
DEMO.