When I use the overflow property on a div to set that it
should display scrollbars when the contents will come out
of the clipping area, I would like to check whether this
happens or not.
I want to make the same functionallity that is in the
MSDN library help. To be able to expand the div when
there is scrolling, but I only want to give the user the
option when there actually is overflow.
Sombody knows how to check this?
Thanks,
Robert
var obj = document.getElementById("yourElement");
obj.style.overflow = (obj.offsetHeight > 300) "auto":"";
/J
Not excactly what I had in mind, but it works as intended.
What I was looking for is a "flag" that shows whether the
overflow was activated or not. Using your version, I will
check whether height is greater than the specified height
and than set the overflow property. But this also works,
so what the heck.
Robert
>.
>