fill in the blank and multiple choice quiz
<p>Could someone please take a look at my code? It's a simple quiz with one multiple choice question and one fill in the blank.</p>

<p>When the user clicks on 'submit' I tried to show some kind of response with correct/incorrect images next to the question. It works with the multiple choice question, but not with the fill in the blank. How can I get the fill in the blank question to work. It always shows the answer as being wrong. Thank you. </p>

<pre><code>answer_list = [
['False'],
['body','hips','knees']

// Note: No comma after final entry
];

response = [];

function setAnswer(question, answer) { 
response[question] = answer; 
}

function CheckAnswers() {
var correct = 0;

var flag, resp, answ;

for (var i = 0; i &lt; answer_list.length; i++) {
flag = false;
for(var j=0; j&lt;answer_list[i].length; j++){
resp = response[i].toLowerCase();
answ = answer_list[i][j].toLowerCase();


#################################################################################################   
if (response[0] == answer_list[0]) { 

flag = true; 
document.myquiz.a1c.style.backgroundImage="url('correct.gif')"; 
}
else{   
document.myquiz.a1c.style.backgroundImage = "url('incorrect.gif')";
document.myquiz.a1c.value = " ANS: False. Position the head snugly against the top bar of the frame and then bring the foot board to the infant's feet.";
}


if (response[1] == answer_list[1]) { 

flag = true; 
document.myquiz.a1d.style.backgroundImage="url('correct.gif')"; 
}
else{
document.myquiz.a1d.style.backgroundImage = "url('incorrect.gif')";

} 
###################################################################################################

}

if (flag) { correct++; }
}
document.writeln("You got " + correct + " of " + answer_list.length + " questions correct!");
}

&lt;/SCRIPT&gt;
&lt;/HEAD&gt;
&lt;FORM name="myquiz"&gt;

&lt;B&gt;1. When measuring height/length of a child who cannot securely stand, place the infant such that his or her feet are flat against the foot board.&lt;/B&gt;
&lt;label&gt;&lt;INPUT TYPE=radio NAME=question0 VALUE="True" onClick="setAnswer(0,this.value)"&gt;True&lt;/label&gt;
&lt;label&gt;&lt;INPUT TYPE=radio NAME=question0 VALUE="False" onClick="setAnswer(0,this.value)"&gt;False&lt;/label&gt;

&lt;textarea rows="2" cols="85" name="a1c" style="background-repeat:no-repeat"&gt;&lt;/textarea&gt;


&lt;B&gt;2. When taking a supine length measurement, straighten the infant's &lt;INPUT id="test" TYPE=text NAME=question1 size=10
onChange="setAnswer(1, this.value)"&gt;, &lt;INPUT id="test" TYPE=text NAME=question1 size=10
onChange="setAnswer(1, this.value)"&gt;, and &lt;INPUT id="test" TYPE=text NAME=question1 size=10
onChange="setAnswer(1, this.value)"&gt;.&lt;/B&gt;

&lt;textarea rows="2" cols="85" name="a1d" style="background-repeat:no-repeat"&gt;&lt;/textarea&gt;


&lt;INPUT TYPE="button" NAME="check" VALUE="Check Answers" onClick=CheckAnswers()&gt;
&lt;/FORM&gt;
&lt;/div&gt;
&lt;/FONT&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
</code></pre>
