my tables id is ctl00_ContentPlaceHolder1_Quote1_RadGdProductList_ 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.cells[7].firstChild.value);
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
.................................................. ..
Expand|Select|Wrap|Line Numbers
- function doSubTotal(c){
- var subTotal=0;
- table=document.getElementById('ctl00_ContentPlaceHolder1_Quote1_RadGdProductList_ctl01');
- for(var i=1;i<table.rows.length;i++){
- var rowTotal=Number(table.rows[i].cells[7].firstChild.value);
- subTotal=eval(subTotal)+eval(rowTotal);
- }
- document.getElementById('ctl00_ContentPlaceHolder1_Quote1_TxtBxSubTotal').value=subTotal;
- }