Need hint. Refresh sortable-list after draging element

Hello,

i implemented a dragable list semilar to railcast 147 and it works fine.

Each item of my list has a value wich is accumulated … like this

  • Value A = 3, Sum = 3
  • Value B = 4, Sum = 7
  • Value C = 1, Sum = 8

When i drag Item C on item A i get this

  • Value C = 1, Sum = 8
  • Value A = 3, Sum = 3
  • Value B = 4, Sum = 7 After reload the page it is shown correctly. But i woud like to refresh only the list to avoid traffic …

Maybe someone can give me a hint which command or technic i should use.

thanks

Christian

I'm a little confused. When you refresh the page, what do you see? The original order, or the newly sorted order?

If the latter, then there's no need to refresh the page at all. That's the whole point of an Ajax sortable -- your page layout is persisted back to the database, so you don't have to refresh the page. The new order is the new DOM order and (after a little back-channel traffic, is the new database order, too.

If you're looking for some confirmation that the new order "took", you might want to look at the highlight callback.

Walter