Absolute Path In HTML Is Not Working
I'm trying to build a HTML template with a small javascript code. Here is the stuff... At the root, I built two files : index.html &
Solution 1:
How you run your page will matter.
If you're trying to run it with the file://
protocol (by just opening index.html
), an absolute path won't resolve correctly. You'll want to somehow run an local server (there are dozens of ways to do this, depending what all you're using, too large a scope for this question).
If you are running some kind of local server (i.e., http://localhost
), then try opening the file directly with http://localhost/headerfooter.js
. If that doesn't work, your file isn't quite where you think it is.
Post a Comment for "Absolute Path In HTML Is Not Working"