DaveC426913
05-09-2003, 10:57 AM
I'm trying to place an image (an icon) on top of another image (a map) using DHTML and layers, so that one is relative to the other.
Currently, I place the map using HTML and then start the icon's DIV with an absolute XY offset based on where on the page the map is. But as the page is edited, the map's position will change, so a static XY offset will be useless.
Any suggestion as to how I can:
a] read the absolute XY coords of the map so I can use that as my offset?
or
b] place the icon relative to the map regardless of absolute coords?
Browser-independent solutions are preferred, but IE solution will suffice.
Current sample (http://www.pathcom.com/~davecoll/)
(If there's no map here then it's been moved to the Archive page.)
The JavaScript (http://www.pathcom.com/~davecoll/warchalk/mapcoords.js)
Thanks,
Dave
Currently, I place the map using HTML and then start the icon's DIV with an absolute XY offset based on where on the page the map is. But as the page is edited, the map's position will change, so a static XY offset will be useless.
Any suggestion as to how I can:
a] read the absolute XY coords of the map so I can use that as my offset?
or
b] place the icon relative to the map regardless of absolute coords?
Browser-independent solutions are preferred, but IE solution will suffice.
Current sample (http://www.pathcom.com/~davecoll/)
(If there's no map here then it's been moved to the Archive page.)
The JavaScript (http://www.pathcom.com/~davecoll/warchalk/mapcoords.js)
Thanks,
Dave