No, if you drag things between lists on a page, you are moving the  
actual DOM object out of one list and into another, and the ID remains  
the same, just the parent object changes.

Likewise, when you sort elements on the page, their order changes, but  
their ID remains the same. If you use the onUpdate callback to the  
Sortable, you can update the database with the result of the sort  
operation, as seen in the Sortable.serialize Wiki page:

In my cut-down example, I have an Ajax call to go out to the database  
and get a new ID. That's the only place new IDs can come from in my  


On May 5, 2009, at 1:49 PM, WLQ wrote:

> Does it have anything to do with auto Idi-ing? I mean if you have
> sortable and you change the order of items, that will auto change the
> Id's to the necessary ones. And so if you drag and item and on the
> drop (without ghosting=true) drop between item 2 and 3, that will
> change the droppable items id to 3, and all others after original 2
> plus 1.

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to