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

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

Logo

Dynamic Headline Fader, Version 3.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">
<!--
   FDRboxWid = 150;
   FDRboxHgt = 90;
   FDRborWid = 4;
   FDRborCol = "red";
   FDRborSty = "double";
   FDRbackCol = "white";
   FDRboxPad = 5;
   FDRtxtAln = "center";
   FDRlinHgt = "11pt";
   FDRfntFam = "Geneva,Arial,sans-serif";
   FDRfntCol = "black";
   FDRfntSiz = "10pt";
   FDRfntWgh = "bold";
   FDRfntSty = "normal";
   FDRlnkCol = "blue";
   FDRlnkDec = "none";
   FDRhovCol = "red";
   FDRgifSrc = "fade.gif";
   FDRgifInt = 60;
   FDRblendInt = 3;
   FDRblendDur = 1;
   FDRmaxLoops = 1;
   FDRendWithFirst = true;
   FDRreplayOnClick = true;
   FDRjustFlip = false;
   FDRhdlineCount = 1;
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2 TYPE='text/javascript'">
<!--
document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='news.js' TYPE='text/javascript'><\/SCRIPT>");
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2 TYPE='text/javascript'">
<!--
document.write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='fader.js' TYPE='text/javascript'><\/SCRIPT>");
//-->
</SCRIPT>
...
</HEAD> 
<BODY>
...
<DIV ID="elFader"
     STYLE="position:relative;visibility:hidden;width:100;">
</DIV>
( recommended only for TABLEs )
or:
<DIV ID="elFader"
     STYLE="position:absolute;visibility:hidden;width:100;">
</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: Nov 30, 1999
Revised: Nov 30, 1999

URL: http://www.webreference.com/dhtml/column27/allCode1.html