function gotoUrlWithSelect(suburl){ var form = document.forms[0]; var count=0; var id=""; for (var i = 0; i < form.elements.length; i++){ if (form.elements[i].type == "checkbox"){ if ((form.elements[i].name == "idbox")&&form.elements[i].checked){ id+=form.elements[i].value+","; count++; } } } if (count==0){ alert("��ѡ��һ��ѡ��"); return ; } id = id.substring(0,id.length -1); if(suburl.indexOf("?")>0) self.location= suburl+"&ids="+id; else self.location= suburl+"?ids="+id; } /* gotoUrlKey("/command/mycmd","NODEID","&type=show")*/ /* /command/mycmd?NODEID=1111&type=show */ function gotoUrlKey(suburl,keyword,append){ var form = document.forms[0]; var count=0; var id=""; for (var i = 0; i < form.elements.length; i++){ if (form.elements[i].type == "checkbox"){ if ((form.elements[i].name == "idbox")&&form.elements[i].checked){ id=form.elements[i].value; count++; break; } } } if (count==0){ alert(""); return ; } self.location= suburl+"?"+keyword+"="+id+append; } function openUrl(suburl){ var form = document.forms[0]; var count=0; var id=""; for (var i = 0; i < form.elements.length; i++){ if (form.elements[i].type == "checkbox"){ if ((form.elements[i].name == "idbox")&&form.elements[i].checked){ id=form.elements[i].value; count++; break; } } } if (count==0){ alert(""); return ; } var url = suburl+id; window.open(url); } function gotoUrl(suburl){ self.location= suburl; } function SelectAllDocs(select){ var form = document.forms[0]; if (form.idbox==null) return; if (form.idbox.length ==null){ form.idbox.checked = select; form.allbox.checked = select; } else for (var i = 0; i < form.idbox.length; i++) form.idbox[i].checked = select; } function gotoPage(suburl){ document.forms[0].action = suburl; document.forms[0].submit(); } function gotoPageN(suburl){ var gotopageno = document.forms[0].gotoPageNo.value; var pagecount = document.forms[0].pageCount.value; if (gotopageno == "") { alert(""); return false; } if(new Number(gotopageno) > new Number(pagecount)){ alert(gotopageno+">?"+pagecount+"!"); return false; }else{ //url = suburl + "?pageNo="+gotopageno; //document.forms[0].action = url; //document.forms[0].submit(); turnToPage(gotopageno); } } function submitForm(URL){ document.forms[0].action=URL; document.forms[0].submit(); } function All(){ if(document.formN.idbox!=null){ for (var i=0;i1){ hasonechecked = false; break; } } } if(hasonechecked==false){ alert("��ѡ��һ��ѡ��"); } return hasonechecked; } function checkOne(URL){ if(hasOneItemChecked()) { submitForm(URL); } else{ alert(""); } } function checkOneWithInfo(URL,info){ if(hasOneItemChecked()) { submitForm(URL); } else{ alert(info); } } function delItem(URL){ var hasonechecked=false; if (document.formN.idbox.checked==true){ hasonechecked=true; } for (var i=0;i0){ self.location= suburl+"&ids="+id+upnodeid+displaytype+listid+totalcount+displaycount; }else{ self.location= suburl+"?ids="+id+upnodeid+displaytype+listid+totalcount+displaycount; } }else return ; } //???????????? function exchange(){ var upnodeid=""; var listid=""; var displaytype=""; var strURL=""; var strLeft=""; var strRight=""; var strType=""; var form = document.forms[0]; for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].name == "upnodeid") { upnodeid = form.elements[i].value; } if (form.elements[i].name == "listid") { listid = form.elements[i].value; } if (form.elements[i].name == "displaytype") { displaytype = form.elements[i].value; } } if (upnodeid != "" && this.location.href.indexOf("upnodeid")<=0){ upnodeid= "&upnodeid="+upnodeid; }else{ upnodeid = ""; } if (displaytype != "" && this.location.href.indexOf("displaytype")<=0){ displaytype= "&displaytype="+displaytype; }else{ displaytype=""; } if (listid != "" && this.location.href.indexOf("listid=")<=0) { listid= "listid="+listid+"&"+this.location.href.substring(this.location.href.indexOf("?")+1); } else{ listid= this.location.href.substring(this.location.href.indexOf("?")+1); } strURL="http://"+ location.host+"/command/CommonList?"+listid+upnodeid+displaytype; //alert("strURL="+strURL); if (strURL.indexOf("displaytype")>0){ strRight = strURL.substring(strURL.indexOf("displaytype=")+12); //alert("strRight="+strRight); strType = strRight.substring(0,1); //alert("strType="+strType); strRight = strRight.substring(1); //alert("strRight="+strRight); strLeft = strURL.substring(0,strURL.indexOf("displaytype=")-1); //alert("strLeft"+strLeft); if (strType == "0"){ strURL = strLeft + strRight +"&displaytype=1"; }else{ strURL = strLeft + strRight +"&displaytype=0"; } } else{ strURL = strURL + "&displaytype=1" } //alert("strURL="+strURL); self.location= strURL; } function closeWindow(){ // window.close(); top.close(); } function selectPic(){ var form = document.forms[0]; var count=0; var id=""; for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].type == "checkbox"){ if ((form.elements[i].name == "idbox")&&form.elements[i].checked){ id+=form.elements[i].value+","; count++; } } } if (count!=1){ alert(""); return ; } id = id.substring(0,id.length -1); top.opener.document.all.url.value="/command/Display?nodeid="+id; top.close(); // window.opener.document.all.url.value="/command/Display?nodeid="+id; // window.close(); } function createNewNode(url){ var form = document.forms[0]; var upnodeid = form.upnodeid.value; self.location= url + "&NODEID=" + upnodeid; } //cag 2005-6-6 function dbChangeOrder(customOrder) { var strURL=new String(window.location); if(strURL.indexOf("?")>0) strURL=strURL.substr(0,strURL.indexOf("?")); var orderObj=document.getElementById("customOrder"); var dirObj=document.getElementById("orderDirection"); if(orderObj.value==customOrder) { if(dirObj.value=="ASC") dirObj.value="DESC"; else dirObj.value="ASC"; } else { orderObj.value=customOrder; dirObj.value="ASC"; } submitForm(strURL); } //cag 2005-6-6 function customSearch() { var strURL=new String(window.location); if(strURL.indexOf("?")>0) strURL=strURL.substr(0,strURL.indexOf("?")); //alert(strURL); submitForm(strURL); } function turnToPage(pageNo){ var strURL=new String(window.location); if(strURL.indexOf("?")>0){ strURL=strURL.substr(0,strURL.indexOf("?")); } strURL = strURL + "?pageNo=" + pageNo; submitForm(strURL); } function submitFormWithOneParam(url) { var ParamName=url.substring(url.lastIndexOf("&")+1,url.length-1); var paramValue=document.getElementsByName(ParamName)[0].value; submitForm(url+paramValue); } function next() { if (event.keyCode=='13') { event.keyCode='9'; } } var _findIndex=0; var _findWhat=""; var _findObj=""; function getOurWant() { var objSelect=window.event.srcElement; if(objSelect.length<20) return; if(event.ctrlKey) { window.showModelessDialog("/selectList.jsp",objSelect) return ; } if(!event.shiftKey) return; if(_findObj!=objSelect.name) { _findObj=objSelect.name _findIndex=0; } _findWhat=window.prompt(":",""); if(_findWhat=="") return; if(_findWhat==null) return; for(var i=0;i0) { objSelect.selectedIndex=i; _findIndex=i; return; } } if(confirm("\""+_findWhat+"\" ,\n ")) getOurWant(); else { _findWhat=""; _findIndex=0; } } function getOurWantNext() { if(_findWhat=="") return; var objSelect=window.event.srcElement; var objSelect=window.event.srcElement; if(objSelect.length<20) return; if(_findObj!=objSelect.name) return; if (event.keyCode==38) { for(var i=0;i<_findIndex;i++) { if(objSelect[i].text.indexOf(_findWhat)>0) { objSelect.selectedIndex=i; _findIndex=i; return; } } alert("\""+_findWhat+"\" "); objSelect.selectedIndex=_findIndex+1; } if (event.keyCode==40) { if(_findIndex>=objSelect.length) _findIndex=0; for(var i=_findIndex+1;i-1) { objSelect.selectedIndex=i-1; _findIndex=i; return; } } alert("???????????? \""+_findWhat+"\" ??????"); objSelect.selectedIndex=_findIndex-1; } } function openCheckedUrl(suburl){ var form = document.forms[0]; var count=0; var id=""; for (var i = 0; i < form.elements.length; i++){ if (form.elements[i].type == "checkbox"){ if ((form.elements[i].name == "idbox")&&form.elements[i].checked){ id+=form.elements[i].value+","; count++; } } } if (count==0){ alert(""); return ; } var url = suburl+id; url=url.substring(0,url.length-1) window.open(url); } var productTypeSort = new Array; function getProductTypeSort(apptype,objSelect){ window.status="......."; var xh = new ActiveXObject("Microsoft.XMLHTTP"); url="/command/QueryProductTypeCommand?PRODUCTTYPE=TYPE&APPTYPE="+apptype; xh.open("POST",url,true); xh.send(); var x=0; while(xh.readyState==1) { alert(""); } if(xh.readyState!=4) {window.status="";alert('');return false;} if(xh.status==200) { var ptypeIndex=0 var codenames=xh.responseText; var xmlDoc= new ActiveXObject("MSXML.DOMDocument"); var f_load=xmlDoc.loadXML(codenames); if(!f_load) {window.status="";alert('!');return false;} xmlDoc.async="false" if(xmlDoc.readyState>2) { var codeNames=xmlDoc.documentElement.childNodes; for(i=0;i-1) EDIT_POSTRECENAME=EDIT_POSTRECENAME.substr(EDIT_POSTRECENAME.indexOf(":")+1); document.forms[0].EDIT_POSTRECENAME.value=EDIT_POSTRECENAME; var the_value=v_obj.value; var pos=the_value.indexOf("******"); EDIT_POSTNODEID=the_value.substr(0,pos); document.forms[0].EDIT_POSTNODEID.value=EDIT_POSTNODEID; the_value=the_value.substr(pos+6); pos=the_value.indexOf("******"); EDIT_ZIPNO=the_value.substr(0,pos); document.forms[0].EDIT_ZIPNO.value=EDIT_ZIPNO; the_value=the_value.substr(pos+6); pos=the_value.indexOf("******"); EDIT_POSTADD=the_value.substr(0,pos); document.forms[0].EDIT_POSTADD.value=EDIT_POSTADD; the_value=the_value.substr(pos+6); pos=the_value.indexOf("******"); EDIT_POSTRECEIVER=the_value.substr(0,pos); document.forms[0].EDIT_POSTRECEIVER.value=EDIT_POSTRECEIVER; EDIT_POSTTEL=the_value.substr(pos+6); document.forms[0].EDIT_POSTTEL.value=EDIT_POSTTEL; } function areAllCheckboxUnChecked( objname ){ var checkboxs = document.getElementsByName( objname ); if ( checkboxs == null || checkboxs == undefined ){ // checkbox return true; } var allBoxUnChecked = true; // checkbox for ( var i = 0; i < checkboxs.length; i++ ){ if ( checkboxs[i].checked ){ allBoxUnChecked = false; break; } } return allBoxUnChecked; }