You need to specify a "receive" event handler for when the dragged item is received, such as
$("#selectedUsers").sortable({
connectWith: ["#userList"],
receive: function(event, ui) {
objectMoved(ui.sortable, this);
}
});
function objectMoved(obj, newContainer) {
/* here you would either perform some sort of AJAX request,
* or dynamically add/update a form-field for POSTing if you
* are doing standard form submission
*/
}
You'll also need to attach the same receive event to "userList"
Note that I haven't used the "sortable" ui helper before, but it should be a similar principle to "draggable" and "droppable", and I've based my example on what I know from these other two helpers - if it's not entirely correct, it should be close.