+ 1
Why does my DropDownMenu not Work
I wonder why my dropdown Menu is not working. I want it in an extern js not in the html. How it should work: if you choose like "2. Semester" in the second dropdown should be just possible to chose "Modul 5" - "Modul 8" if you choose "3.Semester" than it should be just possible to choose "Modul 9"-"Modul 12" in the second dropdown THis is the code: https://code.sololearn.com/WfCHRCweyms8
13 odpowiedzi
0
Remember to not get reference of elements (like using getElementById and similar) BEFORE element is loaded... See here for a better understanding
https://code.sololearn.com/WlA8Fx8bl6nI/?ref=app
+ 2
Start with adjust how declare your array (you missed many ',' between elements like [[1,2,3],[2,3,4],...)
+ 2
Yes, for this i used the word "start" 😉... Anyway, linked code is without adjustments yet
+ 2
Thogh i dont helped you directly i hope that i helped you indirectly 😉... Anyway, thank you, its always good help others to learn and, at same time, learn togheter 😊
+ 1
now its better
https://code.sololearn.com/WfCHRCweyms8
, and thanks again KrOW its realy great what ya doing!
0
I realy don't know why it's not working I was looking in the www but found no solution
0
Oh right visual studio didn't get that syntax error :p and I was not focused enough than.
Thanks crow:)..but still not solving the problem :(
0
What you ment with your last sentence?
0
What you did just now 😉
0
hmm found the start atribute just in connection with lists not with the selector
0
@KrOW hey Im not sure why the moduls are not shown. Cause the eventlisener is in the onload method that meens all elements are loaded.
but why the function medulSet get not activated after selection?
https://code.sololearn.com/WfCHRCweyms8
0
It's working now :-))))
https://code.sololearn.com/WfCHRCweyms8