On 19 Apr 2007, at 06:59, [EMAIL PROTECTED] wrote:

> Thanks for the reply.
> I am new to Prototype/Scriptaculous. I think you mean to say something
> like this -
> There will not be any target ids and if the event is in x position I
> need to get
> the target id equals (or nearer) to that x position. I think it is
> depends upon the
> browser. Am I correct ?

Yes, exactly. Prototype has pointerX and pointerY properties in the  
Event class.

You first need to obtain the position of the container, run through  
the DOM tree upwards and add the offsetLeft and offsetTop values of  
each element. Then you can use this value in a method to calculate  
the position of the mouse over the grid in the container.


Best regards

Peter De Berdt


--~--~---------~--~----~------------~-------~--~----~
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