
现在问题是如果点击确定按钮时连续点了两下就会提交两次。
请问如何让他只能提交一次?

$('<div id="sysAdmin_merchant_addDialog"/>').dialog({
title: '<span style="color:#157FCC;">商户签约</span>',
width: 900,
height:550,
closed: false,
href: '${ctx}/biz/bill/merchant/10411.jsp',
modal: true,
buttons:[{
id:'confirmation',
text:'确认',
disabled:false,
iconCls:'icon-ok',
handler:function() {
$('#sysAdmin_merchant_addForm').form('submit',{
url:'${ctx}/sysAdmin/merchant_addMerchantInfo.action',
success:function(data) {
}
});
}
},{
text:'取消',
iconCls:'icon-cancel',
handler:function() {
}
}],
onClose:function() {
}
});
------解决方案--------------------
提交后,套个遮罩层,把整个页面遮住,提交成功后,隐藏掉即可。
然后遮罩层可以显示“提交中”的信息,让用户知道数据正在处理
------解决方案--------------------
你添加事件验证重复提交。