I have 3 different dropdowns which are all connected to each other. in the second drop-down options appear based on the selection in the first one...and so on
let's say I select that I have books and movies in the first one.
If I select books ---> the song of ice and fire and a clash of kings appear if I select movies ---> Django Unchained, pulp fiction appear... etc
However, if a user makes "mistake" of choosing the wrong book (let's say the song of ice and fire) and goes back to books ---> the same book is still appearing in the select dropdown.
What I want to do, is "reset" or the clear result of the previously chosen section.
I've tried doing this:
document.getElementById('books').value = ""; but it completely deletes the placeholder of the second dropdown. I want the placeholder to be back to option 0 ---> choose a book
Here is my fiddle
Please help me solve this problem
option(s) which you don't wan't, set their css property(display: none;)