Hi sethammons, In fact you can pick every element position with prototype, not just for a draggable. The method to use is Element.cumulativeOffset at http://api.prototypejs.org/dom/element.html#cumulativeoffset-class_method If there is a scroll bar that modify position of the element, prefer the Element.cumulativeScrollOfset at http://api.prototypejs.org/dom/element.html#cumulativescrolloffset-class_method
of course both method could be call with element#cumulative... -- david On 25 nov, 01:43, sethammons <seth.amm...@gmail.com> wrote: > Hi all! > I'm a php person, and relatively new to javascript -- so I appreciate > any help I can get! My question: How do I get the center coordinates > and/or the top left coordinates of a draggable after it is dropped in > the droppable? Here is my situation: > > I am letting users upload images. In their image, they specify a given > area. Later, another user then either clicks or drags a draggable -- I > haven't chosen yet -- in the area that they think the originator put > their selected area, and the php checks the results after the page > reloads. > > For example, the originator uploads a picture of the solar system, and > specifies where Earth is. I then have the coordinates of a box that > surrounds Earth stored in the database. Later, a user comes by and > attempts to identify Earth by either clicking or dragging a pointer or > circle or box within the earlier specified and stored coordinates. The > second user then submits the page, and I can compare to see if the > coordinates of the second user fall within the coordinates of the > given area from the original user. > > I hope that this does not sound too convoluted. Thanks for any help > you guys can offer! > --Seth -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.