A T-banner - JxPharmacy - Doc JavaScript | 2
Code (A T-banner)
<HTML>
<HEAD>
<TITLE>Page Title Here</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
// Copyright (c) 2000 internet.com Corp.
// https://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.
function makeArray(n) {
this.length = n;
}
function stopBanner() {
if (bannerRunning)
clearTimeout(timerID);
bannerRunning = false;
}
function startBanner() {
stopBanner();
showBanner();
}
function showBanner() {
var text = ar[currentMessage];
if (offset // decrease value to increase speed (must be positive)
var pause = 1000 // increase value to increase pause
var timerID = null;
var bannerRunning = false;
var currentMessage = 0;
var offset = 0;
var arlength = 3; // number of messages (to solve an NS2 bug)
var ar = new makeArray(arlength); // number of messages
ar[0] = "This is a \"T-banner,\" written by Tomer Shiran.";
ar[1] = "Don't forget to copy the onLoad event handler.";
ar[2] = "Be sure to visit Doc JavaScript for more scripts and columns."
// -->
</SCRIPT>
</HEAD>
<BODY onLoad="startBanner()">
.
.
.
</BODY>
</HTML>
Created: November 6, 1997
Revised: December 4, 1997
URL: https://www.webreference.com/js/pharmacy/tbannercode.html