DHTML Lab - dhtmlab.com - Dynamic Headline Fader, Version 2.0 | 2

Dynamic Headline Fader, Version 2.0
The Complete Code 1/2
A sample HTML page, news array, and the fader.js external file may be downloaded in ZIP format.
The In-Page HTML and SCRIPT
<HTML>
<HEAD>
...
<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
<!--
NS4 = (document.layers);
IE4 = (document.all);
boxWid = 150;
boxHgt = 90;
borWid = 4;
borCol = "red";
borSty = "double";
backCol = "white";
boxPad = 5;
txtAln = "center";
linHgt = "11pt";
fntFam = "Geneva,Arial,sans-serif";
fntCol = "black";
fntSiz = "10pt";
fntWgh = "bold";
fntSty = "normal";
lnkCol = "blue";
lnkDec = "none";
hovCol = "red";
gifSrc = "fade.gif";
gifInt = 60;
blendInt = 3;
blendDur = 1;
maxLoops = 1;
endWithFirst = true;
replayOnClick = true;
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='news.js'><\/SCRIPT>");
document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='fader.js'><\/SCRIPT>");
//-->
</SCRIPT>
...
</HEAD>
<BODY>
...
<DIV ID="elFader"
STYLE="position:relative;visibility:hidden;">
</DIV>
or:
<DIV ID="elFader"
STYLE="position:absolute;visibility:hidden;">
</DIV>
...
</BODY>
</HTML>
The news.js External File
prefix="http://www.internetnews.com/"; arNews = [ "The Latest News From News Harvester","", "Sun Says Microsoft Tried to Hijack Java","Reuters/1998/09/1001-sun.html", "U.S. Financial Firms See E-Commerce Troubles","Reuters/1998/09/0906-us.html", "FTC Bars E-Tailer In Fraud Case","bus-news/1998/09/0902-ftc.html", "E*TRADE Adds E-Mail for Investors","bus-news/1998/09/0903-etrade.html", "Microsoft, Ernst \& Young Debut eCommerce RapidStart","ec-news/1998/09/0906-microsoft.html", "Lucent, WorldPort Sign Equipment Deal for Euro Network","isp-news/1998/09/0901-lucent.html", "Microsoft Moves In With GeoCities","bus-news/1998/09/0901-microsoft.html", "NAI Unveils PGP Enterprise Security","intra-news/1998/09/0901-nai.html", "Amazon Targets Classical Listeners","ec-news/1998/09/0902-amazon.html", "Microsoft, Sun Battle In Court Over Java","Reuters/1998/09/0901-bat.html" ]
The complete fader.js file is reproduced on the final page.
Produced by Peter Belesis and
All Rights Reserved. Legal Notices.Created: Sep 07, 1999
Revised: Sep 07, 1999
URL: http://www.webreference.com/dhtml/column25/allCode1.html


