EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Deiva on May 18, 2012, 03:01:05 AM



Title: How can make a mask before submit in a form?
Post by: Deiva on May 18, 2012, 03:01:05 AM
in a dialog, there is form.
Code:
<div id="dialog" class="easyui-dialog" closed="true" buttons="#dialog-btns"><form id="form1"> form html code ... </form></div>
<div id="dialog-btns">
        <a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="save()">Save</a>
</div>

I want to make a mask when click [save] button, just like refresh in datagrid, showing [processing, please wait...] with mask behind.
after submit finished, then remove the mask.

Could someone tell me how to do that?


Title: Re: How can make a mask before submit in a form?
Post by: Deiva on May 18, 2012, 03:04:07 AM
Here is mask sample. for reference...


Title: Re: How can make a mask before submit in a form?
Post by: stworthy on May 27, 2012, 12:06:08 AM
Please use the progress messager:
Code:
$.messager.progress();  // show the message box
$('#ff').form('submit',{
onSubmit:function(){
  var v=$(this).form('validate');
  if(!v) $.messager.progress('close');  // close the message box
  return v;
},
success:function(){
  $.messager.progress('close');  // close the message box
}
});


Title: Re: How can make a mask before submit in a form?
Post by: karogel on October 08, 2015, 01:48:17 AM
could id be just like refresh in datagrid, showing [processing, please wait...] and not using messenger approach