+ 1

Code is not working on SoloLearn IDE

I've posted two web codes in last two days When I copy the code of HTML CSS and JS from my IDE to SoloLearn IDE It shows error for some reason, that I dunno I simply just copied it but why the error is occurring? So to solve this issue I used iframe and embedded the GitHub Page link to the iframe But I can't use that code in SoloLearn, why? Here are the codes: https://code.sololearn.com/WHN47wOvCnp6/?ref=app https://code.sololearn.com/W2atVCp27sKv/?ref=app

14th Jun 2021, 4:42 PM
‎Keshav
‎Keshav - avatar
3 odpowiedzi
+ 2
by copy-pasting each file in its related tab, you make the js loading in head rather than at body end... (at least on android app') the solution is to wrap all your code in an onload event to defer the script execution after DOM was populated ;) I'll do it for you (and for test purpose: there could be some downsides) for the first of your code: however, I let you do same for the second, as it was requiring be to redo all the new lines (copy-paste from browser source code remove them on my mobile at least) and takes a lot of time ;P https://code.sololearn.com/W8L2e2xe0hOT/?ref=app
14th Jun 2021, 5:40 PM
visph
visph - avatar
+ 1
feel free to request help by posting the playground link to your non-working code: if I do not have to copy-paste the sources, I would fix it more quickly and less annoying ;)
14th Jun 2021, 5:42 PM
visph
visph - avatar
+ 1
visph Yea it worked!! Thanks for the help 😄 I'll do the same for the other one :D
15th Jun 2021, 7:05 AM
‎Keshav
‎Keshav - avatar