0
Hi, 
In a page, By selecting values I display a table using javascript ajax.
The table looks like this:
S.no    name   S1       S2        S3     S4     S5     Total

1       A     80        90       78      76     100     424
2       B     50        50       50      50     100     350
;;
.
.
.
it goes like this.
My problem  is, I want to calulate total automatically when we type in s5 and display it in total field for each and every row in the table.
How to do? for me first row working  perfectly and displays the total in total field. But remaining, not working
2
Contributors
5
Replies
19
Views
1 Year
Discussion Span
Last Post by diafol
0

Is the data coming from PHP? If PHP, then adding a sum item is pretty simple. It can be done on the fly in JS too. Are you creating the whole thing (html table) in PHP and simply getting js to chuck it into the page or are you doing something a little more involved like asking js to process the raw data and place into new dom elements?

0

for me first row working perfectly and display its sum of total in the first row of total.
But remaining rows values are calculating but displays it in the first row total field only, but not in respective total fields. How to do?

0

Any chance that you could show the js you're already using and any HTML? Otherwise we're re-inventing the wheel

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.