Hello
As far I undestand you want to know if there was no answer from server after submiting a form. If thats the case the onSubmit can validate if there was no answer, an error or success.
1. create a function to submit when click on button.
2. check for the answers of the onSubmit.
function saveProcess(){
$('#fm').form('submit',{
url: 'SaveProcess.php',
onSubmit: function(){
return $(this).form('validate');
},
success: function(result){ // the url must return an answer
if (result == '') { // if no answer (submit failed)
$.messager.show({
title: 'Error',
msg: 'No answer from server'
});
} else if (result.replace(/\W/g,'') !== 'OK'){ //if answer is not OK ("error" you can set your own answer)
$.messager.show({
title: 'Error',
msg: result,
width:'650',
height:'800',
style:{
right:'',
bottom:''
}
});
} else { //the answer is OK.
$.messager.show({
title: 'Success',
msg: 'Process saved',
style:{
right:'',
bottom:''
}
});
}
}
});
};
I'm not sure if this is what you're asking, but is a way to validate the submiting of a form.
regards