sono arrivato a questo punto, non sapendo realmente se è fatto bene oppure no.
Ma..vorrei sapere come faccio a trascrivere il risultato nella input text totalSum.
codice:
<script>
if(document.getElementById("totalSum").value >= 2){
var totParziale= ((((document.getElementById("totalSum").value)/10)+1-0.1).toFixed(2));
//$("input[name^=sum]").sum("click", "#totalSum");
//$("input[name^=sum]").sum("click", totParziale);
//$("input[name^=sum]").sum("click", "#totalSum"){
/*function (){
// get the sum of the elements
//var sum = (($(".textSum").sum())*25).toFixed(2);
var totFloat = ((((document.getElementById("totalSum").value)/10)+1-0.1).toFixed(2));
// update the total
$("#totalSum").text("$" + totFloat.toString());
}
}*/
}
else{
alert("else");
$("input[name^=sum]").sum("click", "#totalSum");
}
</script>
Numbers1:
<input type="checkbox" id="sum" name="sum" value="1" size="2" />
<input type="checkbox" id="sum" name="sum" value="1" size="2" />
<input type="checkbox" id="sum" name="sum" value="1" size="2" />
<input type="checkbox" id="sum" name="sum_alt" value="1" size="2" />
Sum:
<input type="text" name="totalSum" id="totalSum" value="" size="2" readonly="readonly" />
(Change the values for dynamic calculations.)
</p>
come faccio?
grazie mille...