<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<div id="content_imgUpload">

  <%

  //上传类型 

  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="30" 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:none" ></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>
