J
Jens
Hi everyone,
I'm trying to build a simple dropdown menu for a website and i need to
need a way to retrieve
the top and left style attributes of an object. However it seems style
attributes like style.top
a not always available, depeding, i think, on whether the object in
question is positioned relatively or absolutely.
I've been able to use event.pageX and event.pageY with some success,
but it's not really apropriate
for what i wan't
MSIE used to have pixelTop which returned a numerical value and also
the renderStyle which would return the calculated style value of a
auto layouted object, but nothing like this available in firefox and I
assume it isn't standard.dhtml anyway.
What is the recommeded (and fool-proof) way to get the x, y co-
ordinates in javascript using standard
non-browser specific dhtml?
I appreciate any feedback you might have on this.
- Jens
I'm trying to build a simple dropdown menu for a website and i need to
need a way to retrieve
the top and left style attributes of an object. However it seems style
attributes like style.top
a not always available, depeding, i think, on whether the object in
question is positioned relatively or absolutely.
I've been able to use event.pageX and event.pageY with some success,
but it's not really apropriate
for what i wan't
MSIE used to have pixelTop which returned a numerical value and also
the renderStyle which would return the calculated style value of a
auto layouted object, but nothing like this available in firefox and I
assume it isn't standard.dhtml anyway.
What is the recommeded (and fool-proof) way to get the x, y co-
ordinates in javascript using standard
non-browser specific dhtml?
I appreciate any feedback you might have on this.
- Jens