Forums

How do I import JavaScript code into a HTML scripts section using src on the site?

I am trying to import some JavaScript code from a .js file, and I know I need to do <script src="link/to/file.js"></script>, however it seems to not be working for me. Is it done differently on the site or do I need to add something else?

Also, if I don't have type="text/html" (by either having a different type or something entirely different such as a text/javascript type), it gives me a GET http://mine020thefathren.pythonanywhere.com/link/to/file.js net::ERR_ABORTED 404 (NOT FOUND) error.

It's probably an issue with static files mappins.