I\'d like to overlay a div (or any element that\'ll work) over a table row (tr tag) that happens to have more than one column.
I have tried a few methods, which don\'t s
Getting the height and width of an object straightforward. The hard part for me was the Top and Left coordinates for absolute positioning.
This is the only script that has ever worked reliably for me:
function posY(ctl)
{
var pos = ctl.offsetHeight;
while(ctl != null){
pos += ctl.offsetTop;
ctl = ctl.offsetParent;
}
return pos;
}
function posX(ctl)
{
var pos = 0;
while(ctl != null){
pos += ctl.offsetLeft;
ctl = ctl.offsetParent;
}
return pos;
}