跳转页面
代码
function returnParent() { var arrReturn = new Array(); var tSel = LAAccountsGrid.getSelNo(); if( tSel == 0 || tSel == null ) //top.close(); alert( "请先选择一条记录,再点击返回按钮。" ); else { try { //alert(tSel); arrReturn = getQueryResult(); top.opener.afterQuery( arrReturn ); } catch(ex) { alert( "没有发现父窗口的afterQuery接口。" + ex ); } top.close(); } } function getQueryResult() { var arrSelected = null; tRow = LAAccountsGrid.getSelNo(); //alert("111" + tRow); //edit by guo xiang at 2004-9-13 17:54 //if( tRow == 0 || tRow == null || arrDataSet == null ) if( tRow == 0 || tRow == null ) return arrSelected; arrSelected = new Array(); //设置需要返回的数组 //edit by guo xiang at 2004-9-13 17:54 arrSelected[0] = new Array(); arrSelected[0] = LAAccountsGrid.getRowData(tRow-1); //arrSelected[0] = arrDataSet[tRow-1]; return arrSelected; }
top.openr是跳转前的页面
function afterQuery( arrQueryResult ) { var arrResult = new Array(); if( arrQueryResult != null ) { // fm.all(‘modifyButton‘).disabled=false; arrResult = arrQueryResult; fm.all(‘GroupAgentCode‘).value= arrResult[0][0]; fm.all(‘Account‘).value= arrResult[0][1]; fm.all(‘conAccount‘).value= arrResult[0][1]; fm.all(‘AccountName‘).value= arrResult[0][2]; // fm.all(‘AgentName‘).value= arrResult[0][2]; if(arrResult[0][3]==‘有效‘) { fm.all(‘State‘).value=‘0‘; fm.all(‘StateName‘).value=‘有效‘; } else { fm.all(‘State‘).value=‘1‘; fm.all(‘StateName‘).value=‘无效‘; } fm.all(‘OpenDate‘).value= arrResult[0][4]; // tOpenDate= arrResult[0][4]; fm.all(‘DestoryDate‘).value= arrResult[0][5]; // fm.all(‘Bank‘).value= arrResult[0][6]; fm.all(‘BankCodeName‘).value= arrResult[0][6]; fm.all(‘BankCode‘).value = arrResult[0][7]; fm.all(‘JXBankCode‘).value= arrResult[0][11]; fm.all(‘Operator‘).value= arrResult[0][8]; fm.all(‘ModifyDate‘).value= arrResult[0][9]; fm.all(‘AccountOld‘).value= arrResult[0][1]; fm.all(‘AgentCodeOld‘).value= arrResult[0][0]; //查询交叉销售银行名称 var Sql_BankName="select bankname from ldbank where bankcode=‘"+fm.all(‘JXBankCode‘).value+"‘ "; var strQueryResult_BankName = easyQueryVer3(Sql_BankName, 1, 1, 1); if (strQueryResult_BankName) { var arr = decodeEasyQueryResult(strQueryResult_BankName); fm.all(‘JXBankCodeName‘).value= trim(arr[0][0]) ; } getAgentName(); // tdisable(); } }
将数据传过来之后,保存的form.input.value中