0

In a table, I show S.No , Name , Amount, Payable Amount, Balance Amount dynamically.

So I need a calculation to show balance amount by subtracting payable amount with amount for all textboxes in onblur dynamically. Here is my code. But it does for only the first row, and how to do rest of all.

function showbal()
{
document.getElementById('balance').value = document.getElementById('amount').value - document.getElementById('payable_amount').value 
}
2
Contributors
1
Reply
9
Views
2 Years
Discussion Span
Last Post by jkon
1

The reason is simple , ids are uniques , class names in other hand are not. “So I need a calculation to show balance amount by subtracting payable amount with amount for all textboxes in onblur dynamically.” you wrote , this isn't a question , this is something that you can't express in words. First we must know what is balance amount for you , what is payable amount and what those has to do with the onblur . Provide that simple feeds and probably you will receive help

Edited by jkon

Votes + Comments
removed php tag :)
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.