im searching for a way to find the relative coordinates of a mouse click.if you dont understand what i mean: i have a DIV of a certain size positioned somewhere on the site. the user can click on that div and the app needs to know where exactly that is, the upper left corner of the div being (0, 0) and the lower right being eg. (200, 135)
i tried something like
x = Math.round(e.pageX - e.originalTarget.offsetLeft)
y = Math.round(e.pageY - e.originalTarget.offsetTop);
but that doesnt work as i have found out a few minutes before (and ie an opera dont have originalTarget)
can you give me a hint?
greetz
--
Michael Siebert <[EMAIL PROTECTED]>
www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs