Consult the Crystal Ball


Enter your question below.







About This Page

The question, answer, and buttons are part of a FORM. The question is obtained from the FORM text box using a JavaScript function called by the onClick event.

There are 52 possible answers stored in an array. When a question is entered, a check is made to see if the question text box has something in it (if not, an alert is put up). A "random" number between 0 and 51 is calculated from the time the question was posed. This number is used to select the answer. The answer is written to the other text box.

The Go Back button also uses the onClick event to go to the previous page via the history property. ©Lewis A. Shadoff, 1997