+ 1

How can i add my 2 JavaScript files in sololearn

I need a project on my laptop and I want to share it on solo learn but I had a folder called JS that has two JavaScript files but I don't know how I can add the 2 to my project

2nd Nov 2022, 8:11 AM
Olumide Nifemi
6 Answers
+ 2
With your code as is, you should remove line 35 of HTML tab and wrap the code in the JS tab within the onload handler as suggested. In this case, using window.onload inside of HTML you are essentially hiding the money object from the rest of your script, hence the fetching issues. https://code.sololearn.com/WQH4atPEiFG6/?ref=app There is also a syntax error at line 35, missing parentheses behind the function keyword.
3rd Nov 2022, 9:31 PM
ODLNT
ODLNT - avatar
+ 2
You can put both script contents in the Javascript tag.
2nd Nov 2022, 10:35 AM
Lisa
Lisa - avatar
+ 2
Yes, I found your thread again :) Try to put this around all your js: window.onload = function() { // here your js } If you do that there is still an issue with fetching the data from the url. Unfortunately, I don't know how to fix that.
2nd Nov 2022, 7:42 PM
Lisa
Lisa - avatar
0
Oh ok thanks
2nd Nov 2022, 7:34 PM
Olumide Nifemi
0
https://code.sololearn.com/WXNHRoBTtb0m/?ref=app Lisa this is the code but it doesn't work here it works perfectly fine on my browser but it doesn't work here
2nd Nov 2022, 7:38 PM
Olumide Nifemi
0
Oh ok thanksšŸ¤²šŸ¾
2nd Nov 2022, 7:44 PM
Olumide Nifemi