I
ipy2006
In my HTML I have,
<input type="button" class="cartonsumkey" value="Sum Cartons"
onclick="sumup(this);" />
In an external file that is called in Head area, I have,
function sumup( o ) {
var totoalCartons = 0;
var row = document.getElementById( 'oceanDeliveries' ).rows;
var i = row.length - 1;
var lastrow = row;
while(i--) {
totalCartons += parseInt( row.cells[8].innerText ) || 0;
}
if( lastrow.cells[8] ) {
lastrow.cells[8].firstChild.nodeValue = totalCartons;
}
o.disabled = true;
}
I am getting Error: Object expected.
Please help!
Thanks,
Yasaswi
<input type="button" class="cartonsumkey" value="Sum Cartons"
onclick="sumup(this);" />
In an external file that is called in Head area, I have,
function sumup( o ) {
var totoalCartons = 0;
var row = document.getElementById( 'oceanDeliveries' ).rows;
var i = row.length - 1;
var lastrow = row;
while(i--) {
totalCartons += parseInt( row.cells[8].innerText ) || 0;
}
if( lastrow.cells[8] ) {
lastrow.cells[8].firstChild.nodeValue = totalCartons;
}
o.disabled = true;
}
I am getting Error: Object expected.
Please help!
Thanks,
Yasaswi