My thanks go out to http://www.quirksmode.org!!
Event.observe(''scalebar'', ''click'',
function(e){ alert(Event.pointerX
(e)) });
______________________________________________________________________
Alex Duffield . Principal . InControl Solutions . http://
www.incontrolsolutions.com
On 3-Oct-05, at 8:16 PM, Alex Duffield wrote:
> Hey there, I am not all that familiar with using events so I was
> hoping someone on this list would be willing to enlighten me, a bit..
>
> I have set up an observer on a div called "scalebar", that seems
to
> work well.
>
> Event.observe(''scalebar'',
''click'', function(){ alert
> (''clicked me at'') });
>
> What I want to do is get the mouse position ether relative to the
> window, or even better to the "scalebar" div...
>
> I see there are pointerX(event) and pointerY(event) functions in
> prototype, but cant for the life of me figure out how to use them
> to get the info I am looking for.
>
> Thanks!
> ______________________________________________________________________
> Alex Duffield . Principal . InControl Solutions . http://
> www.incontrolsolutions.com
>
>
>
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20051004/4510216f/attachment.html