<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="Javascript">
function SetInnerText(pRow, pTD, pValue)
{
//if (pRow.cells(pTD.cellIndex + 1).style.display == "")
//pTD.innerText = pValue;
if (pTD.id == "tdFinalVarianceTotalProforma") alert(getAbsoluteIndex(pRow,pTD.cellIndex,pTD));
}
function getAbsoluteIndex(t,relIndex,cellp)
{
countnotvisible=0;
countvisible=0;
for (i=0;i<t.cells.length;i++) {
var cell=t.cells[i];
if (cell.id==cellp.id)break;
if (cell.style.display=='none') countnotvisible++; else countvisible++;
}
return countnotvisible+countvisible;
}
function Setme()
{
SetInnerText(document.getElementById("trProformaRow"),document.getElementById("tdFinalVarianceTotalProforma"),"wqE");
}
</script>
</head>
<body>
<table border="1" id="tblProforma" cellspacing="0" cellpadding="0" style="margin-left: 2">
<thead>
<tr>
<td width="100"> Service Group </td>
<td width="123"> Service </td>
<td width="50"> BLT </td>
<td width="50"> Proforma </td>
<td width="50"> Variance </td>
<td width="120"> Comment </td>
<td width="50"> Close Estimate </td>
<td width="50"> Actual </td>
<td width="50"> Variance </td>
<td width="120"> Comment </td>
</tr>
</thead>
<tbody>
<tr>
<td width="100"> </td>
<td width="120"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="125"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="50"> </td>
<td width="125"> </td>
</tr>
</tbody>
<tfoot>
<tr id="trProformaRow">
<td id="tdTotals"> Totals:</td>
<td id="tdService"> </td>
<td id="tdBLTAmountTotalProforma" style="display:none"> </td>
<td id="tdFinalProfTotalProforma"> </td>
<td id="tdInitVarianceTotalProforma"> </td>
<td id="tdComment" style="display:none"> </td>
<td id="tdCloseEstimateTotalProforma"> </td>
<td id="tdActualAmountTotalProforma" style="display:none"> </td>
<td id="tdFinalVarianceTotalProforma" style="display:none"> </td>
</tr>
</tfoot>
</table>
<input type="button" onclick="Setme()">
</body>
</html>
|