Hi, I have a table with some values and this part of code do a sum.
Actually I have the problem that if any value in a cell is NULL the result (the sum) i "n/a".
What's need in this code to assign a "0" value if my cell is NULL?
Code:
if(this.p.sum){
r=this.newrow(f);
for(i;i<t.w;i++){
var j=r.cells[i];
if(this.p.sum.exists(i)){
var s=0, m=t.c[i].format||'';
for(x=0;x<this.t.l;x++){
if(t.a[x].s){s+=parseFloat(t.r[x].cells[i].innerHTML.replace(/(\$|\,)/g,''))}
}
s=decimals(s,t.c[i].decimals?t.c[i].decimals:2);
s=isNaN(s)?'n/a':m=='$'?s=s.currency(t.c[i].decimals):s+m;
r.cells[i].innerHTML=s
}else{r.cells[i].innerHTML=' '}
}
}