I have javascript function that will calculate the value for "TOTAL" row and "Balance" column in the table. But if there are no input, the javascript will return NaN which is not a number error. How to set if there are no input in the text box, javascript will interpret it as 0 so that I will not get NaN error.
As you can see, the textbox for pay(notes 50) column are empty. Then value for balance and total become NaN.

parseIntor equivalent somewhere. Just add anifstatement to check if the String is equal to""or not (empty string)parseInt(value || 0)so that it defaults to 0 if value is not a number.