|
JavaScript Zone Script Tutorials
|
|
Introduction Pre-requisites Installation Notes |
| Introduction |
|
This Javascript demonstrates how to create a document archive viewer. The html page shows archive pages of 20 documents at a time, although this number can be customised. There are functions to move to the next and previous pages, choose a random page, or move to the latest (asumed to be the last) page. A document (in pure text format) can be selected, and it is displayed in a text area. There are then more functions to move to the previous and next documents, choose a random document, or go to the latest (last) document. Note - the documents must live in a single folder, and follow a similar naming standard, namely prefix-nn-suffix, e.g., joke1.txt, joke2.txt, etc. 'joke' is the prefix and '.txt' is the suffix. Future enhancements will include a proper index showing more descriptive file names. In the demo below, register yourself a password, return to the joke zone page,
enter your password, then click on the jokes link to proceed to the jokes archive page.
|
| Pre-requisites |
|
| Installation |
|
| Notes |
|