spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / dhtml / column27
Developer News
Google Going Native With Chrome
Mozilla Fixes Firefox Flaws as 3.5 Release Nears
Microsoft and Novell Still Bosom Buddies

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

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
XML and PHP Simplified · Creating a ASP.NET Contact Form · Data Filtering with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Intel to Host Live Nehalem Q&A · 12 Tips to Troubleshoot Network File-Sharing · 10 Tips for Selling on Kijiji

All Rights Reserved. Legal Notices.
Created: Nov 30, 1999
Revised: Nov 30, 1999

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