buongiorno a tutti

porblema:

ho un form che viene costruito dinamicamente.
può avere N campi da compilare:

<% for x=1 to numerogruppo %>
<tr>
<td>
<input type="text" name="nome<% response.write x %>">
</td>
<td>
<input type="text" name="cognome<% response.write x %>">
</td>
<td>
<input type="text" name="documento<% response.write x %>">
</td>
</tr>
<%next%>

esiste un modo per poter controllare che tutti i campi siano stati compilati?

in pratica un evoluzione di



if (document.form.nome1.value==" "){
alert("Inserire il valore nel campo NOME")
document.form.nome1.focus()
return false;
}


grazie mille per l'aiuto