I have a js function which needs to be called when the page is completely loaded. I tried calling the function on body
as below
onload="GridExpInfo_ClientInsert()"
but it doesn't works as expected, it gets called before the page is fully loaded.
UPDATE
Code:
function GridExpInfo_ClientInsert() {
var rowVal = "0"; // assigned variable with value as 0
for (i = 0; i < GridExpInfo.Rows.length; i++) {
rowVal = i; // assigning values which always takes the value of i
if (GridExpInfo.Rows[i].Cells[7].Value == "" || GridExpInfo.Rows[i].Cells[7].Value == "0") {
document.getElementById('GridExpInfo_ob_GridExpInfoBodyContainer_ctl33_' + rowVal + '_ctl00_' + rowVal + '_Button1_' + rowVal + '').style.display = "none";
}
else {
}
}
}