+ 6
How to link JavaScript file from another Sololearn project?
Like how you can externally link js files in your html by using the <script> tag and specifying a source, I was wondering if the same thing can be accomplished with an external js file in an existing Sololearn project. I want to be able to accomplish this because my js code gets very lengthy and I would like to be able to separate them into different project files so that I don't have to scroll through all my lines of code to find the function I need to modify.
2 Answers
+ 2
Hey PhilS, thanks for taking the time to respond. Although this is a solution, my question was specifically asking to link a js file that's on an existing sololearn project, not a physical external one. I could put it on a server to be hosted on, but that would require updating the server whenever I made changes to that js file on this website.
+ 1
Hey there :)
Was looking for this on the internet but didn't really find a lot of useful stuff.
You might get it working if you access your js file with the full path, including the selection of your PC. Just like in the explorer, but keeping in mind that you're not accessing your file from the local host, like you would if you had the script on the server.
But again: I'm really new to javascript :) Might not be what you're looking for :)