I have three files in my templates folder wheree there is also my main.html file. However when I load the html file I get a 404 error for these 3 files. This is how I’ve included them in the head of the html:
<script type="text/javascript" src="date.js"></script>
<script type="text/javascript" src="daterangepicker.js"></script>
<link rel="stylesheet" type="text/css" href="daterangepicker.css" />
They are all located in a templates folder in the same folder as my main.html.
Why aren’t they being recognised?
Thanks
Your local paths are not resolving correctly. Without seeing your directory structure I can’t say for sure exactly where things are going wrong — I’m a little confused as to where
main.htmlandbase.htmlare residing.If
main.htmlis the file being loaded in the browser, yourscriptsources should be based off that directory. If your template directory (we’ll call it ‘templates’) is a child of the directory wheremain.htmlresides, you want:Alternatively, you could just resolved your entire URL to the appropriate path: