Applet: uTestAnswer10

Description:
The uTestAnswer10 applet is a basic applet that lets you set a specific answer to a specific value. It appears as any configurable image - and upon being pressed - will set the corresponding answer to a preset value.

Note that a typical use of this applet would be to use multiple instances of this applet for the same question number - so that the user can select their answer by clicking on the corresponding image. (See the example below)

Example:

Below is an example of how two of these applets can be used for to select between two possible answers:

(Note that you must unselect one image before you can select the other.)

Which animal is faster?

         


And here is the HTML used to generate the two applets:


<APPLET CODE="uTestAnswer10.class" CODEBASE="../classes/" WIDTH=72 HEIGHT=70>
<PARAM NAME="number"             VALUE="10">
<PARAM NAME="points"             VALUE="5">
<PARAM NAME="image"              VALUE="example_rabbit.gif">
<PARAM NAME="value"              VALUE="Rabbit">
<PARAM NAME="normal_color"       VALUE="#FFFFFF">
<PARAM NAME="highlight_color"    VALUE="#0000FF">
</APPLET>



<APPLET CODE="uTestAnswer10.class" CODEBASE="../classes/" WIDTH=72 HEIGHT=70> <PARAM NAME="number" VALUE="10"> <PARAM NAME="points" VALUE="5"> <PARAM NAME="image" VALUE="example_turtle.gif"> <PARAM NAME="value" VALUE="Turtle"> <PARAM NAME="normal_color" VALUE="#FFFFFF"> <PARAM NAME="highlight_color" VALUE="#0000FF"> </APPLET>


Parameters:

Name Description
CODEBASE This parameter is actually part of the <APPLET> tag and therefore should be specified on the first line of the Applet (see example). It allows you to specify the location of this applet's class file. The recommended value is "../classes/". See codebase for more information.
number The question number that this applet corresponds to - such as "1" for question number 1 of the test or "25" for question number 25 of the test. This number must be an integer.
points The number of points this question is worth - such as "5" if the corresponding question is worth 5 points or "10" if the corresponding question is worth 10 points. The default value is "1". (Note that this parameter is only necessary if using the automatic grading option).
classification This parameter allows you to assign a specific classification to the question. It is currently not used, but may be used in the future to classify or categories questions for grading and/or statistical purposes.
image This parameter allows you to specify the image that will be displayed. Note that due to the security restrictions built into Internet Explorer, when loading any image by an applet, the image must be located in the same directory as the applet's class file. So be sure that the image that you specify here is located in your "classes" directory.
value This parameter allows you to specify the value that the corresponding answer will be set to whenever this applet is selected. You can specify any text value here.
normal_color This parameter allows you to specify the color of the border around the image when the image is not selected. The value of this parameter can be specified as any RGB value such as "#FFFFFF" or as one of the keyword colors such as "white". See color parameter format for more information on colors.
highlight_color This parameter allows you to specify the color of the border around the image when the image has been selected. The value of this parameter can be specified as any RGB value such as "#0000FF" or as one of the keyword colors such as "blue". See color parameter format for more information on colors.