This is extremely simple,
In a HTML
file, inside of a <script>
tag, I have
$.getScript("alert.js");
It doesn't work. alert.js
being a basic alert()
. What am I missing? The error codes read,
[Error] Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin. (alert.js, line 0)
and
[Error] XMLHttpRequest cannot load file:///Volumes/SSD2/kaely/kaely/alert.js?_=1471148162284. Origin null is not allowed by Access-Control-Allow-Origin.
I'm confused. Any help would be greatly appreciated. Thanks.