I usually use this handy script from Quirksmode.com function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop]; }
On Dec 19, 9:46 am, "M. Wieczorek" <nolawncha...@gmail.com> wrote: > Hi, > > Is it possible (through feature or tweak) to have the new X and Y > position values (of the top left corner) of the dragged object > returned? I'm writing an online textbook builder, and would like to > have these values returned, and saved into the database via AJAX, so > the elements' new positions are saved? > > Thanks. --~--~---------~--~----~------------~-------~--~----~ 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-scriptaculous@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 -~----------~----~----~----~------~----~------~--~---