<SCRIPT LANGUAGE="Javascript"> <!-- var question = new Array(); var choiceA = new Array(); var feedbackA = new Array(); var choiceB = new Array(); var feedbackB = new Array(); var choiceC = new Array(); var feedbackC = new Array(); //---INSTRUCTION TO ENTER MULTIPLE CHOICE //---WITH ONE CORRECT ANSWER //---Each questions consists of a set of SEVEN entries: //-- question, //-- choiceA, choiceB, choiceC, //-- feedbackA, feedbackB, feedbackC //---The feedback for correct choice must start with "Good!" //-------------------------DATA BEGINS------------------------- question[1] = "QUESTON 1. What is the opposite of LONG?" choiceA[1] = "Short." choiceB[1] = "Narrow." choiceC[1] = "Tall." feedbackA[1] = "Good! SHORT is the apposite of LONG." feedbackB[1] = "No, NARROW is the opposite of WIDE." feedbackC[1] = "Sorry! TALL is not the opposite of LONG. The word TALL is similar to LONG except that it has to do with vertical dimension. ." question[2] = "QUESTON 2. When can you use the word MAROON?" choiceA[2] = "To describe the weight of an object." choiceB[2] = "To describe the color of an object." choiceC[2] = "To describe the width of an object." feedbackA[2] = "No, you can use words such as HEAVY or LIGHT to describe the weight of an object." feedbackB[2] = "Good! MAROON is very dark red-brown color." feedbackC[2] = "No, you can use words such as ONE FOOT LONG or VERY WIDE to describe the width of an object." //-------------------------END DATA----------------- var Score = 0 var Tr = 0 var UsedA = 0 var UsedB = 0 var UsedC = 0 function CheckA(){ Tr++ document.feedback.tries.value= Tr if (feedbackA[NextQ].indexOf("Good!",0) == 0) { Score ++ } else { Score -- } document.feedback.score.value= Score } function CheckB(){ Tr++ document.feedback.tries.value= Tr if (feedbackB[NextQ].indexOf("Good!",0) == 0) { Score ++ } else { Score -- } document.feedback.score.value= Score } function CheckC(){ Tr++ document.feedback.tries.value= Tr if (feedbackC[NextQ].indexOf("Good!",0) == 0) { Score ++ } else { Score -- } document.feedback.score.value= Score } function FA(){ document.feedback.fb.value= feedbackA[NextQ] if (UsedA == 0){ CheckA(); } UsedA = 1 } function FB(){ document.feedback.fb.value= feedbackB[NextQ] if (UsedB == 0){ CheckB(); } UsedB = 1 } function FC(){ document.feedback.fb.value= feedbackC[NextQ] if (UsedC == 0){ CheckC(); } UsedC = 1 } var NextQ = 0 function ShowQ(QN){ UsedA = 0; UsedB = 0; UsedC = 0; if(document.feedback.fb.value==""&&NextQ!=0) alert("You must select an answer before you go to next question") else{ NextQ = NextQ + QN if (question[NextQ] == null) { alert("No more question! RELOAD to do the exercises again.") Score = 0 } document.feedback.score.value=Score document.feedback.fb.value="" document.mc.q.value=question[NextQ ] document.mc.ca.value=choiceA[NextQ ] document.mc.cb.value=choiceB[NextQ ] document.mc.cc.value=choiceC[NextQ ] } } //document.write("This exercise last modified on: ") //document.write(document.lastModified) //--> </SCRIPT>