Applet: uTestNextButton1

Description:
The uTestNextButton1 applet is a special applet that can be used to immediately display the correct answers during the test (as opposed to waiting until the end of the test). Parameters allow you to specify the expected answer and an explanation that will be displayed in a message window if the user selects the wrong answer. If the user enters the correct answer, then he/she is linked to the next page in the test.

Note: The "target" parameters of this applet allow you to direct the message window and the next page into specific windows/frames.

Note: This sort of applet may be particularly useful for CD-ROM training courses.

Note Also: In addition to this uTestNextButton1 applet, there are a variety of other ways you can configure your test to immediately show right/wrong answers. The uTestJSI.getAnswer() method can be particularly useful for JavaScript implementations. See the uTestTM Programmer's Guide for more information about the uTestJSI JavaScript API.

Click Here To See An Example How The uTestNextButton Applets Can Be Used


Example:

Below is an example of what this applet will look like:



And here is the HTML used to generate the applet:

<APPLET CODE="uTestNextButton1.class" CODEBASE="../classes/" WIDTH=170 HEIGHT=75>
<PARAM NAME="image"                    VALUE="example_next_button.gif">
<PARAM NAME="normal_color"             VALUE="#004200">
<PARAM NAME="highlight_color           VALUE="#00FF00">
<PARAM NAME="question_number"          VALUE="10">
<PARAM NAME="expected_answer"          VALUE="Rabbit">
<PARAM NAME="answer_explanation"       VALUE="Rabbits are faster than turtles...at 
                                              least in short races.">
<PARAM NAME="correct_message"          VALUE="Correct!">
<PARAM NAME="message_instructions"     VALUE="<I>Press <B>Next</B> Again 
                                              To Continue</I>">
<PARAM NAME="next_page"                VALUE="../reference/ref_answer10.html">
<PARAM NAME="next_page_target"         VALUE="FRAME2">
<PARAM NAME="message_target"           VALUE="message_window">
<PARAM NAME="message_background_color" VALUE="#FFFFFF">
<PARAM NAME="message_font_color"       VALUE="#FF0000">
<PARAM NAME="message_font_face"        VALUE="Verdana,Arial,Helvetica">
<PARAM NAME="message_font_size"        VALUE="2">
</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.
image This parameter allows you to specify the image that will be displayed as the Next button (ie. what this applet will look like). 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.
normal_color This parameter allows you to specify the color of the border around the image when the mouse cursor IS NOT over it. The value of this parameter can be specified as any RGB value such as "#FF0000" or as one of the keyword colors such as "red". 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 mouse cursor IS over it. 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.
question_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.
expected_answer The expected (correct) answer for the question number that this applet corresponds to. For True/False questions, this parameter might get set to "True" or "False". For multiple choice questions, this parameter might get set to "A" or "B". Just make sure this value corresponds to the answer that you expect for the corresponding question.
answer_explanation This parameter allows you to specify the explanation of the answer. Whatever "explanation" you enter here will be displayed in the message window if the user gets the corresponding question wrong. You may use HTML tags when specifying this "explanation".
correct_message This parameter allows you to specify the text that will be displayed in the message window when the user gets the corresponding question correct. Typical values for this parameter are "Correct!" or "Right!". The default value is "Correct!". Note that you may use HTML tags when specifying this message.
message_instructions This parameter allows you to specify the instructions that will be displayed at the bottom of the message window... directly after the message explanation. An example value might be: "<I>Press <B>Next</B> Again To Continue</I>". Note that you may use HTML tags when specifying this message.
next_page This parameter allows you to specify the next HTML page that will be displayed after the user finishes this question. You may specify the full URL of the next page here (if the test is online)... or you may simply specify the name of the next page. Note if just specify the name of the next page (as opposed to specifying the full URL), be sure to specify the page relative to your "classes" directory. That is, because of how the CODEBASE works, you must specify the next html as a relative path from your "classes" directory ... such as "../html/next.html" or "../mytest/next.html".
next_page_target This parameter allows you to specify the "target" window/frame in which the "NEXT" page will be displayed. The default value of this parameter is "_top".
message_target This parameter allows you to specify the "target" window/frame in which the "Message Window" will be displayed. The default value of this parameter is "_new", but it is recommended to direct it into a specific frame or message window.
message_background_color This parameter allows you to specify the background color of the message window. It can be specified as any RGB value such as "#FFFFFF".
message_font_color This parameter allows you to specify the color of the font used in the message window. It can be specified as any RGB value such as "#FF0000".
message_font_face This parameter allows you to specify the name of the font used in the message window. Typical values are "Arial" or "Verdana". The default value is "Verdana,Arial,Helvetica".
message_font_size This parameter allows you to specify the size of the font used in the message window. Typical values are "2", "3", or "4". The default value is "2".