ObjectTable.js
上传用户:q2283699q
上传日期:2022-05-17
资源大小:10704k
文件大小:3k
源码类别:

Ftp客户端

开发平台:

Visual C++

  1. AW.XML.SUObjectTable=AW.XML.Table.subclass();AW.XML.SUObjectTable.create=function(){var lng=this.prototype;var pwm=this.superclass.prototype;lng.init=function(sxn,pkwb,lwz){pwm.init.call(this);this.setURL(vjp+sxn+znpb()+((pkwb>0)?"&ID="+pkwb:""));this.initTable(lwz);};lng.initTable=function(lwz){this.setRequestHeader("User-Agent","Serv-U");if(lwz)this.setColumns(lwz);else this.setColumns(["@name","@val","@inherited","@type"]);};lng.GetCollectionByAttrib=function(mrlb,nl,pmb){var nnq="//"+mrlb+"[@"+nl+"='"+pmb+"']";return(this.GetCollection(nnq));};lng.GetCollection=function(nnq){var vsw;var pgvb=this.getXML();if(pgvb){if(AW.ie)vsw=pgvb.selectNodes(nnq);else vsw=this.SelectNodesFF(pgvb,nnq);}return(vsw);};lng.SelectNodesFF=function(szdb,nnq){var vsw=new Array();var pgvb=this.getXML();var rpcb=pgvb.createNSResolver(pgvb.documentElement);var fky=pgvb.evaluate(nnq,szdb,rpcb,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var psx=0;psx<fky.snapshotLength;psx++)vsw[psx]=fky.snapshotItem(psx);return(vsw);};lng.GetNodeValue=function(szdb,nl){var nnq="./@"+nl,pmb="";if(AW.ie){var cnpb=szdb.selectSingleNode(nnq);if(cnpb)pmb=cnpb.text;else pmb=undefined;}else{var vsw=this.SelectNodesFF(szdb,nnq);if(vsw.length)pmb=vsw[0].textContent;else pmb=undefined;}return(pmb);};lng.FillForm=function(Form,lttb,sjj){if(Form!=undefined){ffm(true);Form.reset();this.setAsync(true);this.request();lng.fnResponse=this.response;this.response=function(vtp){this.fnResponse(vtp);for(var ndk=0;(ndk<Form.length);ndk++){var Element=Form.elements[ndk];if(Element!=undefined){var vsw=this.GetCollectionByAttrib("var","name",this.FormatElementName(Element.name));if((vsw!=undefined)&&(vsw.length>0)){var pmb=this.GetNodeValue(vsw[0],"val");var fty=this.GetNodeValue(vsw[0],"defaultval");var twnb=this.GetNodeValue(vsw[0],"default");var klj=this.GetNodeValue(vsw[0],"type");if(pmb!=undefined){if(fty!=undefined)Element.defaultValue=gbpb(fty);if((klj=="3")&&(twnb=="1"))Element.value="";else Element.value=gbpb(pmb);if(Element.onchange!=undefined)Element.onchange();}}}}if(lttb!=undefined)yhd(yfj,lttb,this.m_fnDialogDismissal);if(sjj!=undefined){setTimeout(function(){sjj.getContent("box/text").element().focus();});}if(this.m_fnOnFillForm!=undefined)this.m_fnOnFillForm(this.m_OnFillFormObj,this);this.response=this.fnResponse;};}};lng.SubmitForm=function(Form,lttb,fpy,hcdb){if(Form!=undefined){var txv=((lttb!=undefined)&&(lttb.length!=0));if(txv||hcdb)lnfb(true);this.setRequestMethod("POST");for(var ndk=0;(ndk<Form.length);ndk++){var Element=Form.elements[ndk];if(Element!=undefined){this.setParameter(this.FormatElementName(Element.name),Element.value);}}this.request();if(txv||hcdb){this.response=function(pgvb){var yndb=parseInt(pgvb.getElementsByTagName("result")[0].childNodes[0].nodeValue);var vvy=pgvb.getElementsByTagName("ResultText")[0].childNodes[0].nodeValue;lnfb(false);if(yndb!=spm){jld(jsb(0,"",vvy));}else{if(lttb!=undefined)xk(lttb);if(fpy!=undefined){var cbv=parseInt(pgvb.getElementsByTagName("ObjectID")[0].childNodes[0].nodeValue);fpy(cbv);}}};}}};lng.FormatElementName=function(nl){var szt=nl;if((szt!=undefined)&&(szt.indexOf('_')>=0))szt=nl.substr(nl.indexOf('_')+1);return(szt);};};