views:

39

answers:

1

Hello - We are trying to implement a functionality in our ROR application such that we are able to drag and drop rows between different tables. We tried using Scriptaculous Drag and Drop method but it does not works inside the table tags.

Can you point us to other alternatives like JQuery etc which might be useful.

Thanks Supreet

A: 

You can actually make sortables work within and between tables using scriptaculous. You just need to make sure that all draggable rows are within a tbody element and that you place the ID for the sortable on that.

seengee
Thanks, that resolved my problem.
Supreet
I have another quick question, when the table is empty I am not able to drop data from other tables?
Supreet
not sure about your second question. it might be down to the lack of a tbody? . If my answer is correct please click the tick to accept - and vote up also if you feel generous :)
seengee
actually, i think the answer to the second part is that you need to set `dropOnEmpty: true` within the sortable
seengee
yeah, i tried using it but dropOnEmpty is not working, don't know why?
Supreet
not too sure, maybe open a new question for that. since my answer to your posted question was correct though please mark it correct. thanks :)
seengee