You know you've been reading Pern too long when...
Random Pern Quotations

Every time you click reload (or visit this page) the above quotation from the YKYBRPTLW list will change. It's accomplished by using a simple piece of JavaScript and anyone can include it in their page by adding a reference to the file.

The quotation is random each time and is selected from the newest five entries in each section (except for non-Pern, which is excluded so that people can put in the 'You know you've...' bit and it will still make sense.) The text can be placed within <font> tags (or anything else) so that you can format the returned text.

Note: If you include this piece of code in your page, please add a link to this site (pern.kempe.net) somewhere on your site (preferably where the quote appears) and send me an email so that I can keep a rough track of things.

Requirements: For basic usage, the reader's browser will need to be MSIE 4.0 (or better), Netscape 3.0 (or better), or a browser that can handle <script> blocks with SRC elements.


Usage

  1. Normal Usage
  2. Formatting Information
  3. Advanced Usage

To embed it into your page, add the following line wherever you want the quotation to appear:

<SCRIPT LANGUAGE=JAVASCRIPT SRC="http://pern.kempe.net/pernquote.js"> </SCRIPT>

If you have any problems view this page's source (right-click, then View Source), or email me.

Formatting It

To format the quotation just treat it as you would any another piece of html text. The script writes it to the page using a document.write() call so it will be formatted using the current font, etc.

Example:

To make it look like this, do this:

<FONT SIZE=5 COLOR=#FF1493><STRONG>< put the script stuff here ></STRONG></FONT>

Advanced Usage

For those more skilled in writing Javascript, there is a second way to use the script, one which allows more control over the returned quotation. Instead of writing the quotation to the page, it allows you to call a function that will return a random quotation (a different one each time.)

To use this method, define the document.ReturnPernQuote variable in a separate scripting block before you place the above code into your document. In a scripting block after the code, calling the randomPernQuote() function will return a random quotation.

Example:

<SCRIPT LANGUAGE=JavaScript> document.ReturnPernQuote = ''; </SCRIPT>
<SCRIPT LANGUAGE=JavaScript SRC=http://pern.kempe.net/pernquote.js></SCRIPT>
<SCRIPT LANGUAGE=JavaScript> document.writeln(randomPernQuote()); <SCRIPT>


14 February 1999