<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Video upload</title>


<script language="javascript" src="/js/ajax.js"></script>
<script language="javascript" src="/storeFile/userUpload/upload.js"></script>

</head>

<body onload="FileUploadInit_config_1()">


<div id="content_upload_video">



<form id="fileUplaodForm_video" name="fileUplaodForm_video" action="/store/web/UploadFileWebStoreServlet" method="post" ENCTYPE="multipart/form-data" target="hidden_frame_video"  onsubmit="return subUplaodFileForm_video()">


  <p>视频：
      <input id="fileUPlaod_video" name="fileUPlaod_video" type="file" size="30" maxlength="255">
  </p>


  <p>

    <input type=submit value="上传"></input>
    </p>

     

</form>

   

<!-- -上传后，处理程序转到iframe     target="hidden_frame" target="_blank"  style="display:none"-->

<iframe name="hidden_frame_video"id="hidden_frame_video" style="display:none" ></iframe>

<!-- -显示消息 -->

<p id="msg_video"></p>  


<script type="text/javascript">   

var StoreSystemType="cmsVideoUpload";
var page_Div_TagName_update_js="msg_video" ;
var SaveIoType="Apache_StreamsCopy" ;
var Form_inputID="videourlPath" ;
var callbakFunction="setFilePathUPladed_Form_input";
//before upload call server config
function FileUploadInit_config_1(){

	var url="/storeFile/userUpload/video_init.jsp?StoreSystemType="+StoreSystemType +"&page_Div_TagName_update_js=" +page_Div_TagName_update_js+ "&SaveIoType="+SaveIoType+"&Form_inputID="+Form_inputID+"&callbakFunction="+callbakFunction;
videoInit_ajax(url);
alert("init upload");
}
 

function subUplaodFileForm_video( ){
	var formUpload=document.forms["fileUplaodForm_video"];
	if(formUpload==null){
		alert("Not find uplaod form ,name: fileUplaodForm_video.");
	}else{
	
				//window.open("/storeFile/userUpload/uploadProcessorWindow.jsp");
		window.open('/storeFile/userUpload/uploadProcessorWindow.jsp','uplaodwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no');


		formUpload.submit();
			
		return false;
	}

}

function setFilePathUPladed_Form_input(Form_inputID,fileUploadedPath,msg)    

{    

    //document.getElementById("fileUPlaod").outerHTML = document.getElementById("fileUPlaod").outerHTML;    

    document.getElementById("msg_video").innerHTML = "<font color=red>"+msg+"</font>"; 

	//更新表单字段

	var filePath=   document.getElementById(Form_inputID);

	if(filePath!=null){
			filePath.value=fileUploadedPath;
		}else{
			alert("not find form input element :"+Form_inputID);
		}

}    
function setFilePathUPladed_video(fileUploadedPath,msg)    

{    

    //document.getElementById("fileUPlaod").outerHTML = document.getElementById("fileUPlaod").outerHTML;    

    document.getElementById("msg_video").innerHTML = "<font color=red>"+msg+"</font>"; 

	//更新表单字段

	var filePath=   document.getElementById("VideoFilePath");

	if(filePath!=null){
			filePath.value=fileUploadedPath;
		}else{
			alert("not find form input element :"+Form_inputID);
		}

}   


</script>

Video:<input id="videourlPath" type="text" name="videourlPath"   size="60" maxlength="255"/>

</div>
<!-- end uplaod -->
</body>
</html>
