I'm having a problem regarding accessing a function from one js file to another.
I have tried using jquery to solve this problem, but it does not seems to work. My console in the browser just logs:
http://localhost:58763/orderPicking.js?_=1460542934750 404 (Not Found).
XHR finished loading: GET "http://localhost:58763/orderPicking.js?_=1460542934750".
My js looks like this. This is the one with the function that i want to access from another .js file
function HelloWorld() {
//print Hello World
alert("hello world!");
}
The other .js file(The one that should be able to access the function) looks like this.
test();
function test() {
$.getScript('orderPicking.js', function () {
HelloWorld();
});
}
I have added this to my index.html
<script type="text/javascript" src="views/OrderPicking/orderPicking.js"</script>
<script type="text/javascript" src="views/OrderPicking/orderLines.js"></script>
I hope you guys can help me troubleshooting the problem.