freshgrill
asked on
Calculate Total of Items in table
On a web page, an order form in a table, before user clicks on "submit/order", I want to auto summarize line items and order total (showing order table on both top and bottom of page).
example:
Order Total: $36
Item A $4 user puts in quantity 3 = auto total $12
Item B $6 user puts in quantity 4 = auto total $24
Order Total: $36
example:
Order Total: $36
Item A $4 user puts in quantity 3 = auto total $12
Item B $6 user puts in quantity 4 = auto total $24
Order Total: $36
ASKER
I don't get what I am suppose to do with that, do I have to do ItemAID, ItemBID for each row in the table? And also for the ORDER_TABLE? The number of rows are dynamic each time.
Do you have an example of the html of the table layout you suggest? Otherwise we guess, it's a little off and we have to write code again to obtain the result you want. I understand the number of rows is dynamic, but how are the cells laid out. Show a sample html table layout and it can be done in a few min.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Found my own answer
var AUTO_TOTAL_B = parseFloat(document.getEle
var ORDER__TOTAL = (AUTO_TOTAL_A + AUTO_TOTAL_B).toFixed(2);
document.getElementById("a
document.getElementById("a
document.getElementById("o