<%@ 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>img upload</title>

</head>

<body>


<div id="content">

  <%

  //上传类型 

  request.getSession(true).setAttribute("StoreSystemType","imgUpload");

  //更新标签

  request.getSession(true).setAttribute("page_Div_TagName_update_js","msg");

  ////保存IO方式 ch Bytes Chars Buffer_Chars Buffer_String Apache_StreamsCopy

  request.getSession(true).setAttribute("SaveIoType","Apache_StreamsCopy");

  %>
文件：
<form id="fileUplaodForm" name="fileUplaodForm" action="/store/web/UploadFileWebStoreServlet" method="post" ENCTYPE="multipart/form-data" target="hidden_frame"  onsubmit="return subUplaodFileForm()">

  <p>

    上传文件：
      <input name="fileUPlaod" type="file" size="60" maxlength="255">
      

    </input>
    </p>


  <p>

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

     

</form>

   

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

<iframe name="hidden_frame"id="hidden_frame" style="display:block" ></iframe>

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

<span id="msg"></span>  



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

<script type="text/javascript">    
var upladoisok=false;

function subUplaodFileForm( ){
	var formUpload=document.forms["fileUplaodForm"];
	if(formUpload==null){
		alert("Not find uplaod form ,name: fileUplaodForm.");
	}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(fileUploadedPath,msg)    

{    

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

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

	//更新表单字段

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

	filePath.value=fileUploadedPath;

}    

</script>


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