i am trying to take entered values from textboxes and convert them to strings, total the amount, and then set the innerHTML of a <span>
to that value.
function addBills(){
var
hundreds = parseInt($("#input100").innerHTML(),10)*100;
fifties = parseInt($("#input50").innerHTML(),10)*50;
twenties = parseInt($("#input20").innerHTML(),10)*20;
tens = parseInt($("#input10").innerHTML(),10)*10;
fives = parseInt($("#input5").innerHTML(),10)*5;
ones = parseInt($("#input1").innerHTML(),10);
regTotal = hundreds+fifties+twenties+tens+fives+ones;
window.alert(regTotal);
/*var regTotal = (($("#input100").innerHTML * 100)+($("#input50").innerHTML * 50)+($("#input20").innerHTML * 20)+($("#input10").innerHTML * 10)+($("#input5").innerHTML *5)+($("#input1").innerHTML));*/
for(var counter = 0;counter<regTotal;counter++){
regString = regTotal.toString();
$("#totalCount").innerHTML("regTotal");
}
};