|
You know you've been reading Pern too long when... |
![]() |
<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