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" <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---