screen.availWidth - nWidth)/2; var nTop = _nTop || (window.screen.availHeight - nHeight)/2; //2.Construct parameters for dialog var sFeatures = "dialogHeight: "+nHeight+"px; dialogWidth: "+nWidth+"px; " + "dialogTop: "+nTop+"; dialogLeft: "+nLeft+"; " + "center: Yes; scroll:Yes;help: No; resizable: No; status: No;"; //3.display Dialog var sDialogUrl = TRSAction_ROOT_PATH + "/include/dialog_window.html"; var sURL = this.getActionURL(); var arArgs = new Array(); arArgs[0] = sURL; arArgs[1] = window.location.href; arArgs[2] = _oArgs; try{ var sResult = window.showModalDialog(sDialogUrl, arArgs, sFeatures); return sResult; }catch(e){ alert("您的IE插g已经对话框拦截Q\n" + "请将拦截L-->点击退?->关闭IEQ然后重新打开IEd卛_Q\n" + "l您造成不便QTRS致以歉意Q?); return true; } } /** * 发出带有滚动条非模态对话框交互的请? * @param {int} _nWidth 对话框宽? * @param {int} _nHeight 对话框高? * @param {object} _oArgs 传入对话框的参数Q可以ؓint string array htmlelementQ其它自定义对象不行Q? * @throws 如果览器设|了拦截Q会弹出解除拦截提示 * @return {object} q回? */ function CTRSAction_doModelessDialogAction(_nWidth, _nHeight, _oArgs, _nTop, _nLeft){ //1.verify parameters if(!this.validateActionURL()) return; var nWidth = _nWidth || 200; var nHeight = _nHeight || 200; var nLeft = _nLeft || (window.screen.availWidth - nWidth)/2; var nTop = _nTop || (window.screen.availHeight - nHeight)/2; //2.Construct parameters for dialog var sFeatures = "dialogHeight: "+nHeight+"px; dialogWidth: "+nWidth+"px; " + "dialogTop: "+nTop+"; dialogLeft: "+nLeft+"; " + "center: Yes; scroll:Yes;help: No; resizable: No; status: No;"; //3.display Dialog var sDialogUrl = TRSAction_ROOT_PATH + "/include/dialog_window.html"; var sURL = this.getActionURL(); var arArgs = new Array(); arArgs[0] = sURL; arArgs[1] = window.location.href; arArgs[2] = _oArgs; try{ var sResult = window.showModelessDialog(sDialogUrl, arArgs, sFeatures); return sResult; }catch(e){ alert("您的IE插g已经对话框拦截Q\n" + "请将拦截L-->点击退?->关闭IEQ然后重新打开IEd卛_Q\n" + "l您造成不便QTRS致以歉意Q?); return true; } } /**@private*/ var m_oXMLHttpTemp = null; var INTERVAL_CHECK_XMLHTTP_STATE = 1000; /**@private*/ function CTRSAction_checkXMLHttpStatus(){ if(m_oXMLHttpTemp == null || m_oXMLHttpTemp.readyState == 4){ if(RunningProcessBar){ RunningProcessBar.close(); } if(m_oXMLHttpTemp.status != 200){ switch(m_oXMLHttpTemp.status){ case 401: //CTRSAction_alert("您登录超Ӟ请重新登录!"); window.top.location.href = "../include/not_login.htm"; return null; default: CTRSAction_displyInfo(600, 600, m_oXMLHttpTemp.responseText); return null; } } m_oXMLHttpTemp = null; return; } setTimeout("CTRSAction_checkXMLHttpStatus();", INTERVAL_CHECK_XMLHTTP_STATE); } /** * 发出XMLHttph * @param {string} _sPostData 传送的数据 * @param {boolean} _bAsync 是否为非同步方式 * @param {boolean} _bStartingProcessBar 非同步方式的时候是否显C度条 */ function CTRSAction_doXMLHttpAction(_sPostData, _bAsync, _bStartingProcessBar){ //1.verify parameters if(!this.validateActionURL()) return; var bAsync = false; if(_bAsync)bAsync = true; var oXMLHttp = new ActiveXObject("Microsoft.XMLHTTP"); //建立XMLHTTP对象 if(_bStartingProcessBar){ if(!RunningProcessBar){ CTRSAction_alert("Pleas include [../js/CRunningProcessBar.js]"); return; } RunningProcessBar.start(); try{ oXMLHttp.open("POST", this.getActionURL(), bAsync); oXMLHttp.send(_sPostData); }catch(e){ if(e == "[object Error]"){ alert("pȝ已经关闭Q请退出!"); window.top.window.close(); return null; } } m_oXMLHttpTemp = oXMLHttp; setTimeout("CTRSAction_checkXMLHttpStatus();", INTERVAL_CHECK_XMLHTTP_STATE); return; } oXMLHttp.open("POST", this.getActionURL(), bAsync); try{ oXMLHttp.send(_sPostData); if(oXMLHttp.status != 200){ switch(oXMLHttp.status){ case 401: //alert("您登录超Ӟ请重新登录!"); //CTRSAction_displyInfo(600, 600, oXMLHttp.responseText); window.top.location.href = "../include/not_login.htm"; return null; default: CTRSAction_displyInfo(600, 600, oXMLHttp.responseText); return null; } } }catch(e){ if(e == "[object Error]"){ alert("pȝ已经关闭Q请退出!"); window.top.window.close(); return null; } } delete oXMLHttp; return oXMLHttp.responseText; } /** * 发出弹出H口的交互请? * @param {int} _nWidth 对话框宽? * @param {int} _nHeight 对话框高? */ function CTRSAction_doOpenWinActionX(_sName, _bReplaced, _nWidth, _nHeight){ if(!this.validateActionURL()) return; var nWidth = _nWidth || (window.screen.availWidth - 20); var nHeight = _nHeight || (window.screen.availHeight - 40); var nLeft =(window.screen.availWidth - nWidth-10)/2; var nTop = (window.screen.availHeight - nHeight-20)/2; var sName = _sName || ""; var oWin = window.open(this.getActionURL(), sName, "top="+nTop+",left="+nLeft+",fullscreen =true,menubar =no,toolbar =no,width="+nWidth+",height="+nHeight+",scrollbars=yes,location =no,titlebar=no", _bReplaced); if(oWin == null){ alert("您的IE插g已经窗口拦截!\n" + "请将拦截L-->点击退?->关闭IEQ然后重新打开IEd卛_Q\n" + "l您造成不便QTRS致以歉意Q?); window.close(); }else{ oWin.opener = window; oWin.focus(); } //window.showModalDialog('../include/open_win.jsp', args,'dialogWidth:1px;dialogHeight:1px;dialogTop:1;dialogLeft:1;'); } function CTRSAction_doOpenWinAction(_nWidth, _nHeight){ this.doOpenWinActionX("", false, _nWidth, _nHeight); } /** * 发出不带滚动条对话框交互的请? * @param {int} _nWidth 对话框宽? * @param {int} _nHeight 对话框高? * @param {object} _oArgs 传入对话框的参数Q可以ؓint string array htmlelementQ其它自定义对象不行Q? * @throws 如果览器设|了拦截Q会弹出解除拦截提示 * @return {object} q回? */ function CTRSAction_doNoScrollDialogAction(_nWidth, _nHeight, _oArgs){ //1.verify parameters if(!this.validateActionURL()) return; var nWidth = _nWidth || 200; var nHeight = _nHeight || 200; var nLeft = (window.screen.availWidth - nWidth)/2; var nTop = (window.screen.availHeight - nHeight)/2; //2.Construct parameters for dialog var sFeatures = "dialogHeight: "+nHeight+"px; dialogWidth: "+nWidth+"px; " + "dialogTop: "+nTop+"; dialogLeft: "+nLeft+"; " + "center: Yes; scroll:No;help: No; resizable: No; status: No;"; //3.display Dialog var sDialogUrl = TRSAction_ROOT_PATH + "/include/dialog_window.html"; var sURL = this.getActionURL(); var arArgs = new Array(); arArgs[0] = sURL; arArgs[1] = window.location.href; arArgs[2] = _oArgs; try{ var sResult = window.showModalDialog(sDialogUrl, arArgs, sFeatures); return sResult; }catch(e){ alert("您的IE插g已经对话框拦截Q\n" + "请将拦截L-->点击退?->关闭IEQ然后重新打开IEd卛_Q\n" + "l您造成不便QTRS致以歉意Q?); return true; } } /**@private*/ function CTRSAction_inheritParameters(){ this.oActionParam.setAllParameters(TRSRequestParam); } //Self Action 1----refreshMe /** * h当前的页? */ function CTRSAction_refreshMe(){ var oTRSAction = new CTRSAction(); oTRSAction.doAction(); } //Self Action 2----gotoPage /** * 在列表页面中定位到指定分? * @param {int} _nPageIndex 面序号Q从1开? */ function CTRSAction_gotoPage(_nPageIndex){ var oTRSAction = new CTRSAction(); oTRSAction.setParameter("PageIndex", _nPageIndex); oTRSAction.doAction(); } //Self Action 3----doSearch /** * 按照Form中的数据对当前页面进行检索,一般应用在列表面 * @param {Form} _oForm 索数据的Form对象 */ function CTRSAction_doSearch(_oForm){ var oForm = _oForm; if(_oForm == null) oForm = document.frmSearch; var oTRSAction = new CTRSAction(); var arEls = oForm.elements;//get All data from the form for(var i = 0;i 200){ CTRSAction_displyReports(300, 200, "对不P您输入的索内容过长,出最大长度[200]Q请重新输入Q?); return; } */ oTRSAction.setParameter(arEls[i].name, sValue); } //oTRSAction.setParameter("SearchKey", oForm.SearchKey.value); //oTRSAction.setParameter("SearchValue", oForm.SearchValue.value); oTRSAction.setParameter("PageIndex", 1); oTRSAction.doAction(); } //Self Action 4----doOrderBy /** * 按照指定的方式对面q行排序Q应用在列表面? * @param {String} _sOrderField 排序字段 Ĵ7ֵ