If I understand your problem correctly, I think you just need
<div id="dialog" style="display: none;">
// form here
</div>
so that when the page initially loads, the dialog and form will be hidden until needed.
Edit: and to get the sortable to reload from ajax
if (bValid) {
$.ajax({
type: "POST",
url: "server_items_reorder.php",
data: 'tid=' + portlet_to_edit + '&title=' + name.val(),
success: function() { $('.portlet').sortable('refresh'); }
});
$(this).dialog('close');
}
Rob Van Dam
2010-01-09 21:25:03