Hello:
I've just asked a question about the includes, and I appreciate your help
very much.
However, this still doesn't work for me. What am I doing wrong?
I have a script that should go tho the <HEAD> tag:
<SCRIPT language="JavaScript">
// <!-- Main
function banners()
{
this[1]="http://www.url.com";
this[2]="banners/bann1.gif";
this[3]="http://www.url.com";
this[4]="banners/bann2.gif";
this[5]="http://www.url.com";
this[6]="banners/bann3.gif";
if ((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion.substring(0,1)) < 3)) { return(' '); }
var j=(new Date()).getSeconds() % 3;
document.write('<a href=' + this[2*j+1] + ' target=blank><img src=' +
this[2*j+2] + ' border=0 width=520 height=60></a>');
return(' ');
}
// -->
</SCRIPT>
This script goes to <BODY>:
<SCRIPT language="JavaScript">
// <!-- Main
banners();
// -->
</SCRIPT>
When I insert this script to the page itself - it works great. However, if I
put the HEAD protion of the script into a file banners.js, put this file
into the same directory as the page itself, then add this line to the <HEAD>
tag (or <BODY>, doesn't work anyway):
<script language="javascript" type="text/javascript"
src="banners.js"></script>
- nothing works.
What's wrong?
I would appreciate your advice.
Thank you,
--
Peter Afonin