Click to See Complete Forum and Search --> : JavaScript file has html content in it !!!


SkyNarc
09-29-2006, 09:50 AM
Hi,

I am starting to lose marbles over this.
I have a JS file called random.js linked in my Html file and when I run the index.html file it pulls the JS file into the browser cache. When I open that random.js file, it has all my index.html's code in it. How does that happen?

When I strip the js out of the random.js file and embed it straight into my index.html file, it works fine...

I have attached the JS file in the head of my html like so:
<script src="javascript/random.js" type="text/javascript"></script>


Friday afternoon and almost home time...appreciate the help... :)

SkyNarc
09-29-2006, 10:39 AM
Found the answer. For some reason, when the index.html file running locally it would pull the html content into the javascript file. Uploaded it, and it stopped happening and myscript now works...