浏览 3671 次
锁定老帖子 主题:DWR同步请求的疑惑
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-05-06
最后修改:2009-05-06
代码如下: DWREngine.setMethod(DWREngine.ScriptTag); dwr.engine._path = "http://10.0.1.99:7001/Contract/dwr/"; dwr.util._path = "http://10.0.1.99:7001/Contract/dwr/"; SubBankAJAX._path = "http://10.0.1.99:7001/Contract/dwr/"; DWREngine.setAsync(false); var contextPath = "<%=contextPath%>"; var isSubmit = false; var max_no = 0; isForm = true; //如果为核准按钮时累计金额累加,并要求财务附件上产,如为驳回则财务附件内容清除并付款状态更改 //获得表单 function getForm(){ return document.all.applyForm; } function getAdd(){ var i = 0; var msg = ""; if (document.getElementById("cw_arriveDate").value.length != 10) { i++; msg = msg + i + ".收单日期未填写\n"; } var cwAttachfiles = document.getElementById("max_no").value; if (cwAttachfiles == 0) { i++; msg = msg + i + ".财务附件未上传"; } else { document.getElementById("fileAttach").outerHTML = "<input name='fileAttach' type='file' value='' size='50' style='height: 20px'/>"; } if (msg.length > 0) { alert(msg); return; } else { DWREngine.setAsync(false); SubBankAJAX.addPayment(document.getElementById("formEntity.contractNO").value, document.getElementById("formEntity.payMoney").value); DWREngine.setAsync(true); } var form = getForm(); form.operation.value = "release"; if (form.onsubmit == null || form.onsubmit.call(form)) { var elements = form.getElementsByTagName("input"); if (elements) { for (var i = 0; i < elements.length; i++) { if (elements[i].type == "button") elements[i].disabled = "disabled"; } } form.submit(); } } 而如果在AJAX请求的地方加上alert,则一定可以调用到;DWREngine.setAsync(false);这个方法会无效呢? 各位大侠哪位知道,告诉一下谢谢 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |