in the following code I get error, help please. I cant make it:
<SCRIPT Language="JavaScipt">
var a1 = 1
var res=0
var tmp=0
function check(q, a)
{
if (q==1)
if (a==a1) {
res=tmp+1
tmp = res
}
return true
}
function ShowRes()
{
window.document.text1.T1.value = res
}
</SCRIPT>
<BODY>
<div align="center">
<center>
<p> </p>
<p> </p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="889" height="205" id="AutoNumber1">
<tr>
<td width="82" height="38">Question 1</td>
<td width="801" height="38"> </td>
</tr>
<tr>
<td width="82" height="39"><font size="1">
<INPUT id="QA1-1" type="radio" value="QA1" name="Group1" OnClick='check(1, 1)'> 1</font></td>
<td width="801" height="39"> </td>
</tr>
<tr>
<td width="82" height="39"><font size="1">
<INPUT id="QA1-2" type="radio" value="QA1" name="Group1" OnClick='check(1, 2)'> 2</font></td>
<td width="801" height="39"> </td>
</tr>
<tr>
<td width="82" height="39"><font size="1">
<INPUT id="QA1-3" type="radio" value="QA1" name="Group1" OnClick='check(1,3)'> 3</font></td>
<td width="801" height="39"> </td>
</tr>
<tr>
<td width="82" height="41"><font size="1">
<INPUT id="QA1-4" type="radio" value="QA1" name="Group1" OnClick='check(1,4)'> 4</font></td>
<td width="801" height="41"> </td>
</tr>
</table>
</center>
</div>
<SCRIPT Language="JavaScipt">
var a1 = 1
var res=0
var tmp=0
function check(q, a)
{
if (q==1)
if (a==a1) {
res=tmp+1
tmp = res
}
return true
}
function ShowRes()
{
window.document.text1.T1.value = res
}
</SCRIPT>
<BODY>
<div align="center">
<center>
<p> </p>
<p> </p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="889" height="205" id="AutoNumber1">
<tr>
<td width="82" height="38">Question 1</td>
<td width="801" height="38"> </td>
</tr>
<tr>
<td width="82" height="39"><font size="1">
<INPUT id="QA1-1" type="radio" value="QA1" name="Group1" OnClick='check(1, 1)'> 1</font></td>
<td width="801" height="39"> </td>
</tr>
<tr>
<td width="82" height="39"><font size="1">
<INPUT id="QA1-2" type="radio" value="QA1" name="Group1" OnClick='check(1, 2)'> 2</font></td>
<td width="801" height="39"> </td>
</tr>
<tr>
<td width="82" height="39"><font size="1">
<INPUT id="QA1-3" type="radio" value="QA1" name="Group1" OnClick='check(1,3)'> 3</font></td>
<td width="801" height="39"> </td>
</tr>
<tr>
<td width="82" height="41"><font size="1">
<INPUT id="QA1-4" type="radio" value="QA1" name="Group1" OnClick='check(1,4)'> 4</font></td>
<td width="801" height="41"> </td>
</tr>
</table>
</center>
</div>