I need the full height of a div, I\'m currently using
document.getElementById(\'measureTool\').offsetHeight
offsetHeig
old one - anyway... for all jQuery-banning and shortcut folks out there here is some plus scripting which expands the dimension/getabsoluteheight approaches of the other answers:
function getallinheight(obj) {
var compstyle=(typeof window.getComputedStyle==='undefined')?obj.currentStyle:window.getComputedStyle(obj);
var marginTop=parseInt(compstyle.marginTop);
var marginBottom=parseInt(compstyle.marginBottom);
var borderTopWidth=parseInt(compstyle.borderTopWidth);
var borderBottomWidth=parseInt(compstyle.borderBottomWidth);
return obj.offsetHeight+
(isNaN(marginTop)?0:marginTop)+(isNaN(marginBottom)?0:marginBottom)+
(isNaN(borderTopWidth)?0:borderTopWidth)+(isNaN(borderBottomWidth)?0:borderBottomWidth);
}
alert(getallinheight(document.getElementById('measureTool')));