+ 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

15th Nov 2018, 2:24 PM
jack
jack - avatar
13 ответов
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
15th Nov 2018, 3:27 PM
KrOW
KrOW - avatar
+ 2
Start with adjust how declare your array (you missed many ',' between elements like [[1,2,3],[2,3,4],...)
15th Nov 2018, 2:58 PM
KrOW
KrOW - avatar
+ 2
Yes, for this i used the word "start" 😉... Anyway, linked code is without adjustments yet
15th Nov 2018, 3:07 PM
KrOW
KrOW - avatar
+ 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 😊
15th Nov 2018, 4:53 PM
KrOW
KrOW - avatar
+ 1
now its better https://code.sololearn.com/WfCHRCweyms8 , and thanks again KrOW its realy great what ya doing!
15th Nov 2018, 4:39 PM
jack
jack - avatar
0
I realy don't know why it's not working I was looking in the www but found no solution
15th Nov 2018, 2:51 PM
jack
jack - avatar
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 :(
15th Nov 2018, 3:03 PM
jack
jack - avatar
0
What you ment with your last sentence?
15th Nov 2018, 3:13 PM
jack
jack - avatar
0
What you did just now 😉
15th Nov 2018, 3:20 PM
KrOW
KrOW - avatar
15th Nov 2018, 3:20 PM
jack
jack - avatar
0
hmm found the start atribute just in connection with lists not with the selector
15th Nov 2018, 3:25 PM
jack
jack - avatar
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
15th Nov 2018, 4:02 PM
jack
jack - avatar
15th Nov 2018, 4:06 PM
jack
jack - avatar