I've a js file located in my host http://mywebsite.com/data[0]/data[1]/test.js
that has document.write() function in it.
( data[0] and data[1] are dynamic values that a php module handles them and js output would be different every time these values are chaneged)
when in a html file i use this :
<script src="http://mywebsite.com/data[0]/data[1]/test.js"></script>
it doesn't work but when i save an output of the js file (static values are set and no data[0] and data[1] are used ) in localhost and use this :
<script src="http://localhost/test.js"></script>
it works!
i think something in http request should be the problem but i don't know what !! : (
any help would be appreciated :(
Without seeing what data[0]
or data[1]
output I would guess it is these and you are incorrectly linking to the file.
If you are unable to post your website as an example I suggest you view the source (normally right click on the page and click view source) of your file and click the link (should be possible in most modern browsers) to your javascript file, if you don't see your javascript file you are linking to it incorrectly.
If you could link to the page I could help you further.