halla
2007-Jan-14 21:55 UTC
How to get X/Y coordinates of an element after it was dragged across the document?
Hi everybody,
my name is Daniel, this is my first posting into this group. First of
all, let me please excuse my poor english, I''m from germany, so this is
not my mothertongue I''m writing in.
I''ve a problem concerning the scriptacolous libraray:
First of all, there is a div-element (called "notice"), whis is made
draggable like this:
-----
new
Draggable(''notice'',{handle:''notice_ctrl'',zindex:1000});
-----
In this Div, there''s a text, which can be edited inline, using the
Ajax.InPlaceEditor-Class:
-----
new Ajax.InPlaceEditor(notice_content,
''/index.php?action=save_notice&xPos=''+$(''notice'').offsetLeft''&yPos=''+$(''notice'').offsetTop
-----
The purpose is to save the form-content to a database (of course) and
ALSO the X/Y Coordinates of the element ''notice'' which
contained the
form.
I tried to figure the coordinates of the element after it was dragged
by the user to any place on the page, using something like
xPos=$(''notice'').offsetLeft, as you can see in the
request-String
above. But this only returns the INITIAL position of the element, not
the position AFTER it was dragged...
I''ve absolutely no clue of how to get those coordinates ?!?? Does
anybody have an idea? This would really make my day...
Thanks in advance,
Daniel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---