Hello everybody
I have a form that has two columns of numbers.
this form is the second form in the series of forms and can have different number of rows (selected by user in the previous form) therefore I name the textboxes with an array (for example COLA[1], COLA[2])

I am trying to add a button that adds up the numbers users enter.It does not work. What am I doing worng?
Here is my code:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function computeForm(form)
{
var SUMA = 0;
var SUMB = 0;
var SA = parseFloat(form.COLA[1].value) + parseFloat(form.COLA[2].value);
var SB = parseFloat(form.COLB[1].value) + parseFloat(form.COLB[2].value);
form.SUMA.value = SA;
form.SUMB.value = SB;
return
}
</SCRIPT>
</head>

<body>
<CENTER>
<FORM method=POST>
<TABLE border>
<TR>
<TD>
A
</TD>
<TD>
B
</TD>
</TR>
<TR>
<TD>
<INPUT TYPE=TEXT SIZE=4 NAME=COLA[1]>
</TD>
<TD>
<INPUT TYPE=TEXT SIZE=4 NAME=COLB[1]>
</TD>
</TR>
<TR>
<TD>
<INPUT TYPE=TEXT SIZE=4 NAME=COLA[2]>
</TD>
<TD>
<INPUT TYPE=TEXT SIZE=4 NAME=COLB[2]>
</TD>
</TR>
<TR>
<TD>
<INPUT TYPE=TEXT SIZE=4 NAME=SUMA>
</TD>
<TD>
<INPUT TYPE=TEXT SIZE=4 NAME=SUMB>
</TD>
</TR>
</TABLE>
<INPUT TYPE="button" VALUE="Compute" onClick=computeForm(this.form)></FORM>