Get computed Width of an HTML Element
22
Get computed Width of an HTML Element
function getComputedWidth(theElt){
if(is_ie){
tmphght = document.getElementById(theElt).offsetWidth;
}
else{
docObj = document.getElementById(theElt);
var tmphght1 = document.defaultView.getComputedStyle(docObj, "").getPropertyValue("width");
tmphght = tmphght1.split('px');
tmphght = tmphght[0];
}
return tmphght;
}






I've got good news, and I've got bad news:
The universe is merely a figment of my imagination.
Now are you ready for the bad news?