(Solved) : Html Javascript 2 Dropdown Menus Dynamically Populating Information External Javascript Fi Q44007723 . . .
In HTML & Javascript:
I have 2 dropdown menus that I am dynamically populating frominformation from an external javascript file. One dropdown dependson the “onchange” of another dropdown. The first dropdown has namesof people and the second dropdown has info about people they put inaka categories. For each people, the categories change but I can’thardcode it. I have the items displaying correctly in bothdropdowns but I made it so that a function for the second dropdownis called like this:
dropdown.addEventListener(“change”,peopleBasicInfo);
then this peopleBasicInfo will trigger the info in the seconddropdown to change. To add the options to the second dropdown Iused appendChild() and so every on change the items are added BUT Iwant them to reset every time the first dropdown changes not havethem all added. How would I achieve this?
Expert Answer
Answer to In HTML & Javascript: I have 2 dropdown menus that I am dynamically populating from information from an external javascr…
OR