The code below only works on localhost, online does not work, that is, works perfectly on my machine, when I transfer to the server, none of this works, I have already broken my head and could not solve it.
DETAIL - arquivo.js
is within the root directory of http://loacalhost
without intermediate paths, note:
<script type="text/javascript" language="javascript" src="arquivo.js"></script>
<script type="text/javascript" language="javascript" src="/arquivo.js"></script>
<script type="text/javascript" language="javascript" src="../arquivo.js"></script>
I ran local tests, with the three types mentioned above, and all went well. Already in the server http://xpg.uol.com.br
I have done the same way leaving it in the root, but without success.
In a new attempt, I've included the contents of arquivo.js
inside the HTML document (page index.html
), even so, no chance.
In another attempt with absolute path , relative to server configuration, being:
<script type="text/javascript" language="javascript" src="http://meusite.xpg.uol.com.br/arquivo.js"></script>
.. legal fun when put in localhost
otherwise ... not even think.
Anyway, I seem to be in the scope of the function or even putting it on the page.
I'd like to understand where I'm going wrong. Thank you in advance, everyone's help.