OK, I am a newbe
Say I have a bunch of checkboxes
<tr>
<td colspan='2' class='normal'><input type='checkbox' name='formCheck1'>Check If this Form is Correct</td>
</tr>
<tr>
<td colspan='2' class='normal'><input type='checkbox' name='formCheck2'>Check If this Form is Correct</td>
</tr>
<tr>
<td colspan='2' class='normal'><input type='checkbox' name='formCheck3'>Check If this Form is Correct</td>
</tr>
<tr>
<td colspan='2' class='normal'><input type='checkbox' name='formCheck4'>Check If this Form is Correct</td>
</tr>
And in a function I want to add the number of checkboxes checked.
I am looking for some kind of hack.
I would rather not have to do this over and over
if(!formname.formCheck1.checked)
{
}
I have tried
x = x + ormname.formCheck1.checked
Hoping that a true might work as a 1.
Does anyone know an easy way for this to be done?
thanks