I cant even call a function on different file of Javascript -


i have annoying bug within code, very simple. i've tried alot of things, couldn't work.

i have tried using using script tag, , put code in there, like

<script> function lol() {    alert("hello world!"); } </script> 

and did this

<body onload="lol();"> </body> 

don't me wrong, code works perfectly. except when using code javascript file outside of index.html file.

<script src="src/other/setriox.js"></script> 

the javascript file named setriox.js has function called function loled() holds simple function of alert("hello world!");

now, when same exact thing body onload

<body onload="loled();"> </body> 

it not being called. path setriox.js fine, not miss spelling or that.

here github if want deeper on why loled() function not being called.

https://github.com/setriox/portfolio

is because have not closed comment on js file?


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -