xmlhttp 数组接收后台传过来的数据。


function getModify(liveid){
	var randomnum = Math.floor(Math.random()*(1+100-0)+0);
	var xmlhttp;	
	try{
		xmlhttp= new ActiveXObject('Msxml2.XMLHTTP');
	}catch(e){
		try{
		xmlhttp= new ActiveXObject('Microsoft.XMLHTTP');
		}catch(e){
			try{
				xmlhttp= new XMLHttpRequest();
			}catch(e){}
		}
	}
	if(liveid!=""){
	
        xmlhttp.open("get","/programEdit.do?action=getid&liveid="+liveid+"&dir="+randomnum);
			xmlhttp.onreadystatechange=function(){   
				if(xmlhttp.readyState==4){ 
					if(xmlhttp.status==200){	
						//在这里显示修改的div
						showPopup1();		
						var data=xmlhttp.responseText;
						var arr=data.split(";");	
						document.forms[2].program.value=arr[0];
						document.forms[2].plead.value=arr[1];
						document.forms[2].director.value=arr[2];
						document.getElementById("img2").src=arr[3];
						document.forms[2].film_pic.value = arr[3];
						document.forms[2].proremark.value=arr[6];
						document.forms[2].pid.value=arr[7];
						myarr=arr[7];		
						if(arr[4]==1){
							document.getElementById("zbpdModify").style.display = "block";
							document.getElementById("videoModify").style.display = "none";
							document.getElementById("videosourceModify").style.display = "none";
							
							tree2=new dhtmlXTreeObject("treeboxbox_tree2","100%","100%",0);
							tree2.setImagePath("../../codebase/imgs/csh_bluebooks/");
							tree2.enableCheckBoxes(1);
							tree2.enableThreeStateCheckboxes(true);
							tree2.loadXML("../../codebase/tree10.xml");//下面对应的是tree8
						}
						 /*这下面是  视频源 555 的 */
						 if(arr[4]==3){
							 document.getElementById("zbpdModify").style.display = "none";
							 document.getElementById("videoModify").style.display = "none";
							 document.getElementById("videosourceModify").style.display = "block";
							 tree13=new dhtmlXTreeObject("treeboxbox_tree13","100%","100%",0);
							 tree13.setImagePath("../../codebase/imgs/csh_bluebooks/");
							 tree13.enableCheckBoxes(1);
							 tree13.enableThreeStateCheckboxes(true);
							 tree13.loadXML("../../codebase/tree15.xml");//下面对应的是tree11
					 	}	 
				 		/*这上面是  视频源  555 的*/    	 
						if(arr[4]==2){
					        document.getElementById("zbpdModify").style.display = "none";
							document.getElementById("videoModify").style.display = "block";
							document.getElementById("videosourceModify").style.display = "none";
					        tree3=new dhtmlXTreeObject("treeboxbox_tree3","100%","100%",0);
							tree3.setImagePath("../../codebase/imgs/csh_bluebooks/");
							tree3.enableCheckBoxes(1);
							tree3.enableThreeStateCheckboxes(true);
							tree3.loadXML("../../codebase/tree9.xml");//下面对应的是tree7						
							getModify("")
						}
					}else{
						alert("wrong!");
					}
				}
			}
			xmlhttp.send(null);
			return;								
		}
	var _arr=eval(myarr);
	//给已经选择的下拉框赋值.
	document.forms[2].videolist.length=0;
	
	//不成功是因为少了个eval
	for(var i=0;i<_arr.length-1;i+=2){
		with(document.forms[2].videolist){
			options[options.length]=new Option(_arr[i],_arr[i+1]);
		}
	}
}





String encrypt=form.getEncrypt()==null?"":form.getEncrypt();
			String path=form.getPath()==null?"":form.getPath();
			String server=form.getServer()==null?"":form.getServer();
			String master=form.getMaster()==null?"":form.getMaster();
			String fs=form.getFs()==null?"":form.getFs();
			if("".equals(master) | "".equals(seedid)) 
				seedid="Invalid url";
			else 
			seedid="http://"+master+"/"+seedid+"?fs="+fs;
			message = videoname+","+videotype+","+big+","+uploadtime+","+seedid+","+encrypt+","+path+","+server;
			System.out.println(message);
			ctx.response().setContentType("text/html;charset=GBK");
			ctx.response().getWriter().write(message);
			ctx.forwardByName("");
    		return;

你可能感兴趣的:(xml,Microsoft)