Still More useful fields and buttons

With this script, you type answer in the field, and, when you click on the button a 1 or 0 appears in the box that lets you know if the answer was right. Notice that the box comes preloaded with a score of 0. When you have gone through the exercises, you can click on the 'Click here to total up scores' button to total the scores, which calls a function that you can see in the header.
You can copy the script that generates this question, and then, using a text editor's substitute command, replace the zzz in the source code with 1, 2, 34, or 5 or 6 etc. Thus you can have the number of the questions and the names of the variables in synch . Then for the next question simply do the whole process over again. Remember that you need to use the FORM and /FORM commands only once; Use FORM (with the angle brackets) before your javascripts and /FORM after the last one. as you can see I've done by viewing the source code.


zzz. Your Question (Answer is your answer)



This second script is the same as the first script, except that there are two possible answers. Substitution is qqq.

qqq. Your Question (Answer is your answer or your second answer )


This third script is like the first two, except that, after you have clicked the check answer button, an alert tells you either that the answer is correct or tells you that the answer is wrong and gives you the correct answer. the substitution is jjj. Only one correct answer.

jjj. Your Question (Answer is your answer)
This fourth script is the same as the third script, except that it allows for two answers. yyy is the substiution.


yyy. Your Question (Answer is your answer or your second answer)



   Your total score 



||