in IE4+ is the inline style and not the computed properties, with IE5
you can use
  document.all.elementId.currentStyle.propertyName
to get the computed value, or use
 
document.all.elementId.style.offsetLeft/offsetTop/offsetWidth/offsetHeight
With NN6
  document.getElementById('elementId').style.propertyName
is also the inline style of an element, access
 
document.getElementById('elementId').offsetLeft/offsetTop/offsetWidth/offsetHeight
to find computed values of the position and dimension

Mike Goodstadt wrote:
> 
> simply put I have problem with style (just ask my tailor)
> my prob is sort of more IE but here someone might also have a few hints in
> general for NN condition
> 
> I need to access the values which the rules give to positioned objects.
> eg. to get pixelLeft of a DIV which as a unique id rule setting an absolute
> position left.
> I am calling the object as eg. document.all.idref.style.pixelLeft (for IE)
> With these values I can play and do things like animation.
> 
> however... when the stylesheet is an external linked file.
> all such values are undefined and give results NaN when
> processed in my magic api.It is as if it cant see the values
> but they are 'there' in the positioning on screen :-(
> 
> It all works fine when the style rules are inline (my short-term
> workaround).
> Another thing to mention is that the DIVs are nested...
> 
> My obvious thought were that I am using the wrong reference...
> document.all.idref.style.posLeft
> document.all.idref.style.left
> document.all.idref.styleSheet.something... even???
> but I have found no clear guidance on either the standards or
> implementations.
> (there is good stuff but all on inline attribute referencing)
> 
> If anyone has any good suggestions, advice or just plain tutoring I will be
> v grateful.
> In that case the reward will be a peek at my dirty little api...
> Or you could just tell me where there might be someone who does know.
> 
> M

-- 
        
        Martin Honnen
        http://javascript.faqts.com/
        http://home.t-online.de/home/martin.honnen/jsgoddies.html

Reply via email to