You do not paste your saving code but it may look like this.
$.ajax({
url:...
//...
success:function(){
$('#dlg').dialog('close');
}
})
Hi again,
my saving code is;-
function saveDel(){
$('#fm').form('submit',{
url: url,
onSubmit: function(){
return $(this).form('validate');
},
success: function(result){
var result = eval('('+result+')');
if (result.errorMsg){
$.messager.show({
title: 'Error',
msg: result.errorMsg
});
} else {
$('#dlg').dialog('close'); // close the dialog
$('#dg').datagrid('reload'); // reload the user data
}
}
});
}
but I would have thought it should still close once the save button is clicked? The data gets added to the database ok