Hey Vlad!

Vlad a écrit :
> Posted the question to prototype.js group, but it seems there is
> nearly zero actitivy. I though, maybe you could help.

The other group is stillborn.  This is the official GGroup for Prototype
and script.aculo.us.

> How does one find an element's position (X and Y) using prototype.js?

Well an *element's* position can be found through the methods currently
in the Position namespace (which were migrated to Element in the
upcoming 1.6), such as positionedOffset, for instance.  But that doesn't
appear to be what you need...

> What I need to do is to show image map hot spots when a user rolles
> his mouse over. To do that I need an image position so I could draw a
> div or something over it to show the spot.

So you're interested in the mouse cursor's position over an element, not
the element's position, right?  You'd get that with the clientX and
clientY properties of the event object in a mouse event listener.

But easier still: why don't you just put, say, <span> elements on the
right places and either use CSS :hover (if you can afford to skip IE6-)
or react to their mouseover/mouseout events?

-- 
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to