Using a File Other

Than "questions.txt"


[Home][Index][Previous][Next]
Default Question File:

AppletQuiz automatically looks for a question file called "questions.txt" in the same folder/directory as the web page that contains it.


Specifying a Question File:

The file name "questions.txt" is not very descriptive, so you may want to use file names that give you more information about what type of questions they contain. Also, you may want to have more than one question file in the same folder/directory. It is easy to tell AppletQuiz to use a file other than the default file "questions.txt".

To tell AppletQuiz to use another question file, you include a parameter line in the applet tag. For instance, to use the question file "MyQuestions.txt", the applet tag would look like this:

<applet
codebase="AQ3" 
code="AppletQuiz.class" 
width=400 height=350 
archive="TestApplet.zip">
You need a Java-enabled browser to take this quiz.
<param name="FILE" value="MyQuestions.txt">
</applet>

You can cut & paste this applet tag into your web page if you like (you may need to adjust the codebase parameter), and then change the file name "MyQuestions" to any legal file name.

AppletQuiz will still expect to fine "MyQuestions.txt" in the same folder/directory as the web page that contains the applet.


A Question File in Another Directory

At some point, you will probably want to group some or all of your question files into their own folder/directory. To do this, you specify the path that AppletQuiz needs to follow to find your question file relative to the web page that contains the applet.

To tell AppletQuiz that the question file called "MyQuestions.txt" is in a subdirectory of the current folder/directory called "Quizzes", you would modify the parameter tag as follows:

<applet 
codebase="AQ3" 
code="AppletQuiz.class" 
width=400 height=350 archive="TestApplet.zip">
You need a Java-enabled browser to take this quiz.
<param name="FILE" value="Quizzes/MyQuestions.txt">
</applet>

If AppletQuiz can't find your question file, be sure that:


[Home][Index][Previous][Next]
copyright © 1998 by Jerry L. Stanbrough - all rights reserved.
last update July 10, 2000 by JL Stanbrough (jstanbro@venus.net)