i want to total of all 7th columns(in all rows) of my table
my tables id is ctl00_ContentPl aceHolder1_Quot e1_RadGdProduct List_ctl01
The first row of the table is headings
the following code works fine in IE7
But I am getting 'NaN' when i use Mozilla
i found that
[i]var rowTotal=Number (table.rows.cel ls[7].firstChild.val ue);
is causing problem
what should i use to do this that do work in Mozilla and fire fox atlest
I don't know much javascript
my code is bellow
............... ............... ............... .......
[CODE=javascript]function doSubTotal(c){
var subTotal=0;
table=document. getElementById( 'ctl00_ContentP laceHolder1_Quo te1_RadGdProduc tList_ctl01');
for(var i=1;i<table.row s.length;i++){
var rowTotal=Number (table.rows[i].cells[7].firstChild.val ue);
subTotal=eval(s ubTotal)+eval(r owTotal);
}
document.getEle mentById('ctl00 _ContentPlaceHo lder1_Quote1_Tx tBxSubTotal').v alue=subTotal;
}[/CODE]
............... ............... ............... ............... ............... ...
my tables id is ctl00_ContentPl aceHolder1_Quot e1_RadGdProduct List_ctl01
The first row of the table is headings
the following code works fine in IE7
But I am getting 'NaN' when i use Mozilla
i found that
[i]var rowTotal=Number (table.rows.cel ls[7].firstChild.val ue);
is causing problem
what should i use to do this that do work in Mozilla and fire fox atlest
I don't know much javascript
my code is bellow
............... ............... ............... .......
[CODE=javascript]function doSubTotal(c){
var subTotal=0;
table=document. getElementById( 'ctl00_ContentP laceHolder1_Quo te1_RadGdProduc tList_ctl01');
for(var i=1;i<table.row s.length;i++){
var rowTotal=Number (table.rows[i].cells[7].firstChild.val ue);
subTotal=eval(s ubTotal)+eval(r owTotal);
}
document.getEle mentById('ctl00 _ContentPlaceHo lder1_Quote1_Tx tBxSubTotal').v alue=subTotal;
}[/CODE]
............... ............... ............... ............... ............... ...
Comment