What I would do is get the new ID from the database on drop. So you would create your list of "prototype" widgets that you drag from, then make a Sortable list to drag into. Set the first list to be Draggable with revert: true and ghosting:true, then add an onDrop method to the Sortable list.
Inside that method, you would send an Ajax request to your database for a new widget, and use the numerical ID of that returned widget as the key part of your cloned item ID. I have not figured out how to enable this sort of cloned-sortable thing yet, the best I have been able to do is to drag an element into a sortable list, append it to the list, re-make the Sortable so it can use the new element, and then allow the user to place it precisely. I would love it if someone would document how to drag from a Sortable into another Sortable, place a clone of the original element instead of the original, and then leave the original list intact. I imagine that it would involve making the clone on the initiation of the drag out of the donor list, place it (or not, cleaning up as needed) in the recipient list, and then restoring the original list. Walter On May 4, 2009, at 9:58 AM, WLQ wrote: > > Yeah, I kind of knew that, but how to do that? By the way I am copying > and pasting a row from one table to another. > > On May 3, 5:11 pm, Walter Lee Davis <wa...@wdstudio.com> wrote: >> If you are dragging an item from one list into another list, then by >> W3C fiat, they will have unique IDs. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---