External Javascript reference failing

ansultd

New Member
Messages
16
Reaction score
0
Points
0
I am trying to pull in an external javascript file, rather than put the script in my HTML page. I am referencing it as such:

<script language="javascript" type="text/javascript" src=""http://www.aj-web-design.com/script/test.js"></script>

I can hit the URL of the file, so the path is correct.

Is there a setting that I need to turn on to make it work? JavaScript works if it is in the HTML code, but once it is moved into an external file, it no longer works.

Thanks in advance!
 
Last edited:

crisp

New Member
Messages
85
Reaction score
0
Points
0
Is the fact you didn't post the url of the script because it's not yours?> If so, maybe the owner's wise and prevented hot-linking it? If it is yours, place it in your web root (public_html folder) and just put the name of the script in the src param (no path, just the filename). If it still doesn't work, either you didn't close the tag propery ( </script> not short form /> ) or the scripts broken.

If it is broken and you're using firefox download Firebug extension then you can see what's happening with it.
 

ansultd

New Member
Messages
16
Reaction score
0
Points
0
I am th owner of the targeted file. When I posted, half of my post didn't make it for some reason, so I had to edit the post.
=========================================
I found the issue....

Unclosed tags prior to the script tags.....

dumb mistake, and sorry to waste your time.
 
Last edited:
Top