Originariamente inviato da Xinod
a me sembra che il problema sia qui
document.getElementById('totaleSommeProposta35') = totale;
e' un campo e vuoi settarne il value?
document.getElementById('totaleSommeProposta35').v alue = totale;
ops dimenticanza mia, hai ragione
ora però, correggendo quello, non mi calcola il totale:
Codice PHP:
function aggiornaProposta35(){
var myObj152 = document.getElementById('totaleOggetto152').value;
var myObj151 = document.getElementById('totaleOggetto151').value;
var myObj150 = document.getElementById('totaleOggetto150').value;
var myObj153 = document.getElementById('totaleOggetto153').value;
var myObj154 = document.getElementById('totaleOggetto154').value;
var totale = (1*1)+( myObj152 * 1 )+( myObj151 * 1 )+( myObj150 * 1 )+( myObj153 * 1 )+( myObj154 * 1 );
alert(totale);
document.getElementById('totaleSommeProposta35').value = totale;
}
se tolgo tutti i '*1' mi accoda le variabili invece di sommarmele, ma con i *1 mi restituisce NaN