Click to See Complete Forum and Search --> : Visual object width


danic83
08-20-2003, 05:01 AM
Another question:

I need to retrieve the width of an object. this object is a tooltip that I show whenever the mouse goes over a column's title in a HTML table.

this object is declared as follows:

<DIV id=object1 style="LEFT=25px; POSITION: absolute; TOP=-50px; Z-INDEX: 2">layer hidden off
the screen</DIV>

I tried:

document.object1.style.width

but it doesn't work out. perhaps there is a command that I don't know.. I am sorry but I have just started to learn JavaScript. Please help me if you can, thank you

Daniel

requestcode
08-20-2003, 06:37 AM
I may be wrong, but I believe that the reason you can not get the width is because you have not set the width property in the div tag or through a javascript statement. As a test try setting the width property in the div tag and then try to retrieve it and see what the results are.