salve ho qst funzioni:

function a2cifre(x) {
var c = String(Math.round(x*100));
while (c.length < 3) c = '0' + c;
return c.replace(/([0-9][0-9])$/,".$1");
}

function calcola(){


var qta = document.forms["modulo"].elements["qty[]"];

var uni = document.forms["modulo"].elements["p_uni[]"];
var impo = 0;

for (i=0; i<qta.length; i++) {
if(isNaN(qta[i].value)) {
alert("Inserire solo valori numerici, grazie!");
document.forms["modulo"].elements["qty[]"][i].value = "";
document.forms["modulo"].elements["qty[]"][i].focus();
}
if(isNaN(uni[i].value)) {
alert("Inserire solo valori numerici, grazie!");
document.forms["modulo"].elements["p_uni[]"][i].value = "";
document.forms["modulo"].elements["p_uni[]"][i].focus();
}

document.forms["modulo"].elements["p_tot[]"][i].value=a2cifre(qta[i].value*uni[i].value);

impo=impo+Number(document.forms["modulo"].elements["p_tot[]"][i].value);

}


document.modulo.impo.value=a2cifre(Math.round(impo * 100) / 100);
iva_tot=impo*Number(document.modulo.iva.value)/100;
document.modulo.iva_tot.value=a2cifre(Math.round(i va_tot * 100) / 100);
document.modulo.totale.value=a2cifre(impo+Number(d ocument.modulo.iva_tot.value)+Number(document.modu lo.spese.value));
}

il problema nasce se i vettori qty[] e p_uni[] sono di un solo elemento...

ho provato anche con document.getelementsbyname ma non funge.....

grazie ...