============================================================
Script: Random Quote

Functions: This simple script allows you to print random
quotations in the page. Any number of quotes
may be used.

Browsers: All

Author: etLux
============================================================

INSTRUCTIONS:

Put the following script in the of your page,
wherever you want the quotes to appear. Simply set up the
quotations in the Quotations[] array, then paste in the
whole block of code. To format the text, wrap the usual
font tags around the script (view source on our demo on this
page for an example.)

TECH NOTE:

In quotation 8, note the text, “beauty” — if you need
to use double-quote ” marks, you *must* precede each
double-quote with a backslash … otherwise the script
will break.

THE CODE:

// ==============================================
// Copyright 2004 by CodeLifter.com
// Free for all; but please leave in this header.
// ==============================================

var Quotation=new Array() // do not change this!

// Set up the quotations to be shown, below.
// To add more quotations, continue with the
// pattern, adding to the array. Remember
// to increment the Quotation[x] index!

Quotation[0] = “Abandon normal instruments”;
Quotation[1] = “Accept advice”;
Quotation[2] = “Accretion”;
Quotation[3] = “A line has two sides”;
Quotation[4] = “Allow an easement (an easement is the abandonment of a stricture)”;
Quotation[5] = “Are there sections? Consider transitions”;
Quotation[6] = “Ask people to work against their better judgement”;
Quotation[7] = “Ask your body”;
Quotation[8] = “Assemble some of the instruments in a group and treat the group”;
Quotation[9] = “Balance the consistency principle with the inconsistency principle”;

// ======================================
// Do not change anything below this line
// ======================================
var Q = Quotation.length;
var whichQuotation=Math.round(Math.random()*(Q-1));
function showQuotation(){document.write(Quotation[whichQuotation]);}
showQuotation();

============================================================

Advertisements