+ 1

Why my code(above) is not supported in SoloLearn? But it works on Microsoft edge and other browsers.

https://code.sololearn.com/WGeqJWb40EHA/?ref=app

15th Nov 2017, 3:24 PM
Mursina
Mursina - avatar
9 Answers
0
For the loading issue we can control it by two methods 1)create onload attribute to body element 2)use windows.onload event These are pointed in Solo Learn app. Java script->DOM & events->Handling events.
17th Nov 2017, 5:54 AM
Mursina
Mursina - avatar
15th Nov 2017, 3:31 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 4
marina enclose your Chang variable in a window.onload function😉
15th Nov 2017, 3:32 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 2
I think sololearn web is not exactly like a fully functional browser. Try to use an onload event attribute on you body tag, and to run all the js code inside a function that you call from the onload event. it works for me fine like that :)
15th Nov 2017, 3:32 PM
Uria
+ 1
The problem is it runs before body is loaded so the getElementById returns null. I use a onload attribute to my body tags to avoid that problem.
15th Nov 2017, 3:32 PM
John Wells
John Wells - avatar
+ 1
Thanks for all answers â˜ș
15th Nov 2017, 3:38 PM
Mursina
Mursina - avatar
+ 1
Thanks for your explanation @John Wells â˜ș
15th Nov 2017, 3:43 PM
Mursina
Mursina - avatar
+ 1
Thanks also @Uria â˜ș â˜ș
15th Nov 2017, 3:52 PM
Mursina
Mursina - avatar
+ 1
Above code was deleted mistakenly...Sorry for inconvenience.Bt modified one is saved in my codes which is inserted with window.onload function
15th Nov 2017, 4:10 PM
Mursina
Mursina - avatar