Forum: Ruby How to implement drag and drop

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Arati S. (Guest)
on 2008-12-19 13:31
Hi,

I have a set of draggable objects inside a span. I tried to implement
drag n drop using win32ole library. I used '' function. This funtion
requires x and y coordinates of soucre and destination. I was sucessfuly
able to implement drag and drop but with harded x and y coordinates of
source and destination.

I am reseaching on how to get elements (div, span) x and y coordinates??

Any ideas how can I fix this?


Thanks,
Arati
Arati S. (Guest)
on 2008-12-19 13:37
Arati Sawant wrote:
> Hi,
>
> I have a set of draggable objects inside a span. I tried to implement
> drag n drop using win32ole library. I used '' function. This funtion
> requires x and y coordinates of soucre and destination. I was sucessfuly
> able to implement drag and drop but with harded x and y coordinates of
> source and destination.
>
> I am reseaching on how to get elements (div, span) x and y coordinates??
>
> Any ideas how can I fix this?
>
>
> Thanks,
> Arati

Forgot to mentioned the function name 'MouseClickDrag'.
Max W. (Guest)
on 2008-12-19 16:57
Arati Sawant wrote:
> Arati Sawant wrote:
>> Hi,
>>
>> I have a set of draggable objects inside a span. I tried to implement
>> drag n drop using win32ole library. I used '' function. This funtion
>> requires x and y coordinates of soucre and destination. I was sucessfuly
>> able to implement drag and drop but with harded x and y coordinates of
>> source and destination.
>>
>> I am reseaching on how to get elements (div, span) x and y coordinates??
>>
>> Any ideas how can I fix this?
>>
>>
>> Thanks,
>> Arati
>
> Forgot to mentioned the function name 'MouseClickDrag'.

Have a look at jQuery, it has a variety of different plugins for this
sort of thing.
This topic is locked and can not be replied to.