Hi All,
I have in my application a grid in which a no. of textboxes as template field, which can be increamented .....when i enter some value in first textbox the sum of all textbox should be shown in footer textbox..... how can i use javascript for this.... i can't found next textbox to to calcualte first one.....
i have written this code in .js file
function UpdateField(txt1,grid)
{
alert(txt1.value);
var amt1,amt2;
var gvET = document.getElementById(grid);
var rCount =parseInt(grid.rows.length)-2;
// upto this works fine
for( var i=0;i<rCount;i++)
{
var txtval1=document.getElementById(txt1).value !="" ? document.getElementById(txt1).value : "0";
amt2=parseFloat(amt2) + parseFloat( txtval1);
}
alert(amt2);
}
what is going wrong ?
Thanks
//var txtTotOtherAmount=0;
}