[Proto-Scripty] Re: Is there a way to determine absolute coordinates of an element on the screen?

2009-04-27 Thread Diodeus
You need the famous Kangax Prototype cheat sheet. There is a very handy diagram on the PDF that will help you with this positioning issue: http://thinkweb2.com/projects/prototype/prototype-1602-cheat-sheet/ On Apr 26, 5:56 pm, buda wrote: > this gets coordinates in a page but I need to transla

[Proto-Scripty] Re: Is there a way to determine absolute coordinates of an element on the screen?

2009-04-27 Thread ColinFine
On Apr 26, 10:56 pm, buda wrote: > this gets coordinates in a page but I need to translate them to screen > Does Element.getViewportOffset() not help? Colin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Proto

[Proto-Scripty] Re: Is there a way to determine absolute coordinates of an element on the screen?

2009-04-26 Thread buda
this gets coordinates in a page but I need to translate them to screen On 26 апр, 19:35, Diodeus wrote: > I use this: ( fromhttp://www.quirksmode.org/js/findpos.html) > > function findPos(obj) { >         //find coordinates of a DIV >         var curleft = curtop = 0; >         if (obj.offsetPar

[Proto-Scripty] Re: Is there a way to determine absolute coordinates of an element on the screen?

2009-04-26 Thread Diodeus
I use this: ( from http://www.quirksmode.org/js/findpos.html ) function findPos(obj) { //find coordinates of a DIV var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj =