+ 2
question about the mobile application
Hello, I have a question about the mobile application. the code I entered in the web version works normally, but does not work in the mobile version; Tell me what the problem is. Thanks in advance.
7 Antworten
+ 5
https://www.sololearn.com/Discuss/2678815/?ref=app
Hasmik Gevorgyan welcome!
read this thread again.
He mentioned a similar issue in the description :)
+ 5
the (new) web code playground doesn't handle js tab as android app' (not know how exactly apple app' would handle it).
in the android app', the js tab is included inside the html tab at <head> end, while in web, the js tab is included in the html tab at <body> end...
in the first case, when the js code run for the first time, the DOM is not fully loaded (<body> isn't yet accessible), so you cannot access DOM (or you'll get undefined).
you need to wrap the js tab code in an onload event handler function:
https://code.sololearn.com/WGOX0oSNGCva/?ref=app
+ 2
Thank you.
Here my code
https://code.sololearn.com/Wa184A1A13A7/?ref=app
+ 2
Simba thanks. But in web version dose not error. Code is run normally.
+ 2
Simba thanks so much!!
+ 1
visph thanks so much !!!!😊😊 Worked !!!