I was wondering how to capture the coordinates of a table, image, or div. Something like getBoundingClientRect() but I need it to work with IE4+, MAC, and if possible ns 4.79.
FYI: I am trying to modify an existing piece of NAV menu JS code which currently accepts absolute coordinates.
ex.(this is what exisits now)
showSubMenu(name, …. width, topPosition, leftPosition, visiblity….etc.);
currently the topPosition, and leftPosition pass as numbers so I was hoping that to make it relatively positioned I could do something like:
showSubMenu(name…,width, parentLayer.top + 20, parentLayer.left + 5,…etc.);
this way obviously i am still passing numbers yet they are relative to where the parent layer (top level) of the menu.
to do this i need to get the coordinates of the parent table/layer/div itself, or an image in the parent table… see what I mean?
Sorry I suck at JS……(hehe)(sigh…)
Any help is GREATLY appreciated!
– Shu