利用Cordys插件 上传文件到 Cordys服务器目录

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--

	 ?2003 Cordys R&D B.V. All rights reserved.
	 The computer program(s) is the proprietary information of Cordys R&D B.V. and provided
 	 under the relevant License Agreement containing restrictions on use and disclosure.
 	 Use is subject to the License Agreement.                                                                                                                                                                                                                              

	Project		: Cordys WCP
	File Name	: uploadtoserver.htm
	Description : uploads to server. In order to use this demo page the user needs a java call service
								configured with the required java class exposed to the front end in the form of
								a method called Upload which is implemented in the namespace http://schemas.cordys.com/1.0/devtools.
-->


<html><head>
<title>File Upload</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<script type="text/javascript" src="/cordys/wcp/application.js"></script>
<script type="text/javascript">

	function uploadFile()
	{
		uploader.request = requestString.XMLDocument;
		if ( !system.isIE )
		{	 
			if(document.getElementById("file1").value != "")	
			uploader.uploadFile(document.getElementById("uploadForm1"));
			else
				alert("Choose a file to upload");

		}
		else
		{
				if(document.getElementById("chosenFile").value != "")
				uploader.uploadFile();	
				else
				alert("Choose a file to upload");
		}   	
	
	
	}
	function onLoad()
	{
  	if ( !system.isIE )
	{
	 	document.getElementById("choose").style.display="none";
		document.getElementById("choose1").style.display="none";
	}
	else
	{	
		document.getElementById("file1").style.display="none";
	}

	}
	function onUploadHandler()
	{
		if(window.application.event.status)
			alert(cordys.getXML(window.application.event.response));		
	}	
	</script>	
	<script type="cordys/xml" id="requestString">
	
	    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP:Body>
        <UpLoad xmlns="http://schemas.cordys.com/LVWSAppServerPackage" preserveSpace="no" qAccess="0" qValues="">
          <leavingID />
          <createName />
          <createDate />
          <fileName>Upload:FileName1</fileName>
          <fileContent>Upload:FileContent1</fileContent>
          <comment>PARAMETER</comment>
        </UpLoad>
      </SOAP:Body>
    </SOAP:Envelope>
</script>
	</head>		
	<body onLoad=onLoad()>
	<div cordysType="wcp.library.util.Upload" id="uploader" encode="true" style="display:none" 	onupload="onUploadHandler()" xmlcontent="true"></div>
		<center><h4>File Decode Demo</h4></center>
		<center>
		Select a file to upload:
			<input id ="choose1" type=text name="chosenFile"><input type=button value="Choose File" id="choose" οnclick="chosenFile.value = 	uploader.browse(1)">

		<form action="com.lv.lvattachment.upLoad.wcp" id="uploadForm1" name="uploadForm1" enctype="multipart/form-data" method="post">
		<INPUT type="file" id="file1" name="file1" />
		</form>

		</center><br>		
		<center>
		<input type="button"  value="Upload" name="Upload" onClick="uploadFile()"></input>
		</center>				
	</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值