I recently got into web development and created a simple site. I wanted to link a JavaScript file (file.js) to my site from one directory up but no matter what I've tried it doesn't work.
When looking for solutions people said to use relative paths (which is what I tried using from the start), using "../file.js" to try and move one directory up and then look for the file.
The server is running on apache for Debian 11 and my folder structure is as such:
var
|
www - file.js
|
html - index.html
and my code for loading file.js is as such:
<script src="../file.js"></script>
Any help with this issue would be great.