canceling sortable update event

canceling sortable update event


I'm implementing a portlet style layout using http://ui.jquery.com/repository/real-world/layout/
as a starting point - currently I handle the update event like so,
signaling which item has been updated back to the server:
var sortableUpdate = function(e, ui) {
     if (ui.sender) {
         updateUpDown(ui.sender[0]);
}
else {
var item = ui.item[0];
         var pluginId = item.id.replace("plugin_","");
         var newContainer = item.parentNode.id;
         var index = $('dl', item.parentNode).index(item);
         $.post("/dashboard/moveplugin.rails", { id: pluginId, container:
newContainer, index: index},
function(data) {
if(ui.element[0].id == 'trashcan') {
             emptyTrashCan(ui.item);
         } else {
             updateUpDown(ui.element[0]);
                }
});
        }
}
I'd like to cancel the item move all together if the post doesn't
return a 200 response - I've tried returning false from the event,
but this has no effect... is there a way to do this, or another event
I can use to preview/cancel a move, if I'm unable to synchronize with
the server-side?