EasyUI Forum
June 28, 2024, 11:59:45 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How can make a mask before submit in a form?  (Read 12535 times)
Deiva
Newbie
*
Posts: 9


View Profile Email
« 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?
Logged
Deiva
Newbie
*
Posts: 9


View Profile Email
« Reply #1 on: May 18, 2012, 03:04:07 AM »

Here is mask sample. for reference...
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #2 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
}
});
Logged
karogel
Newbie
*
Posts: 28


View Profile
« Reply #3 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
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!