Here I put my everyday thoughts. Mainly important things to remember but also smart solutions to problems.

25 september, 2005

Read imported style properties

function getElementStyle(elemID, IEStyleProp, CSSStyleProp) 
{
var elem = document.getElementById(elemID);
if (elem.currentStyle) {
return elem.currentStyle[IEStyleProp];
} else if (window.getComputedStyle) {
var compStyle = window.getComputedStyle(elem, "");
return compStyle.getPropertyValue(CSSStyleProp);
}
return "";
}

This solution was found at:
oreillynet