I have a map for my game, I have a script that on a click displays an alert of the mouse coordinates on the map.
The map scale is 1 map unit to 2.5 pixels and the map starts at -600, 600 and goes down to 600, 1700. Thus I can’t simply throw out the pixels of the mouse.
I got it working (and was pretty happy about it) but alas IE (6) has issues. I have narrowed it down to IE not correctly getting the scroll parameters.
Here is the relevant code that is glitching but the full code is located at http://woarl.com/map/ieMap.html
tempX = event.clientX + document.body.scrollLeft; tempY = event.clientY + document.body.scrollTop;
Thanks for any help
Try:
Checked your page, and the DOCTYPE is putting IE in standards mode, so the
scrollXXXproperties you want are actually indocument.documentElement, notdocument.body.