dwr返回值处理
contractNoGenerator.generateContractNo(parent.document.all.kindList.value, {callback:function(conNo){$("contractNo").value = conNo;}, errorHandler:function(errorString, exception) {alert(errorString);}});
?
??
?
commonService.getSettleAccountsByMember(setAllCltAcnts, cltNo);
?function setCltAcnts(rstData){??//$("#payAcntNo option").remove();??//document.all("payAcntNo").innerHTML = "";??//document.all("payBankAcntNo").innerHTML = "";??document.all("payAcntNo").length = 0;??document.all("payBankAcntNo").length = 0;??if(rstData){???$(top).data("CltAcnts:" + $("#payMemberNo").val(), rstData);??}else{???rstData = $(top).data("CltAcnts:" + $("#payMemberNo").val());??}??if(!rstData) return;??if(!rstData.length) return;??for(var n=0;n<rstData.length;n++){???var acnt = rstData[n];???$("<option value='" + acnt.acntNo + "'>" + acnt.acntNo + ":" + acnt.acntName + "</option>").appendTo("#payAcntNo");??}??<%if(!view.isNew()){%>???$("#payAcntNo").val("<%=view.getPayAcntNo() %>");??<%}%>??if(rstData.length > 0){???getBankAcnts($("#payAcntNo").val());??}?} // 返回值为实体数组 settleAccount[] #payAcntNo 为下拉列表框的名字
<select name="payAcntNo" id="payAcntNo" tabIndex="2" style="width:100%" onKeyDown="Tab();">??????<option value=''><请选择单位></option>?????</select>
?
??? 以上两种回调写法。