WebOffice 开发文档

产品网站: http://www.dianju.cn/p/weboffice/
产品论坛: http://www.dianju.cn/forum/viewforum.php?f=2
下载资料: http://www.dianju.cn/forum/viewtopic.php?f=2&t=2
<%@ page language="java"contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/app.tld" prefix="app"%>
<html>
<head>
<title>WebOffice</title>
<link href="<app:ResPath/>/css/inner_vi.css" rel="stylesheet" type="text/css">
<link href="<app:ResRoot/>/res/ws/css/controls.css" rel="stylesheet" type="text/css">
<link href="<%=request.getContextPath()%>/css/content.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<app:ResRoot/>/res/ws/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/weboffice/main.js"></script>	
<!-- 初始化 -->
<script language="javascript" for="WebOffice1" event="NotifyCtrlReady">
	WebOffice1_NotifyCtrlReady();
</script>
<script type="text/javascript">
	function WebOffice1_NotifyCtrlReady() {
		var webObj = document.all.WebOffice1;
	    webObj.OptionFlag |= 128;
	 	webObj.HideMenuItem(0x01 + 0x02 + 0x04 + 0x10 + 0x20 + 0x1000 + 0x4000);
	 	
	    // 文档ID
	    var docId = $("#docId").val();
	    // 附件ID
	    var aid = $("#aid").val();
	    // 附件类型
	    var attachmentType = $("#attachmentType").val();
	    
	    var openfile = document.all.WebOffice1.LoadOriginalFile("/webOffice.do?flag=1&docId="+docId+"&aid="+aid,attachmentType);
	    if(openfile == 0){
	    	alert("File open failed!");
	    }
	}

	function saveFile(){
		// 文档ID
	    var docId = $("#docId").val();
	    // 附件ID
	    var aid = $("#aid").val();
	    // 附件名
	    var fileName = $("#attachmentName").val();
		// 上传修改后的文件
		if(confirm("Are you sure save?")){
			SaveDoc("/webOffice.do?flag=2&docId="+docId+"&aid="+aid,fileName);
			//window.close();
		}
	}
</script>	
</head>
<body style="overflow: hidden">
<form name="myForm">
<input type="hidden" id="docId" value="${docId }"/>
<input type="hidden" id="aid" value="${aid }"/>
<input type="hidden" id="attachmentName" value="${attachmentName }"/>
<input type="hidden" id="attachmentType" value="${attachmentType }"/>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<div class="gap10px"></div>
<tr>
	<td align="right">
    	<input type="button" class="button" value="Save&nbsp;&nbsp;File" onclick="saveFile();"/>
	  	<!-- -----------------------------== 装载weboffice控件 ==----------------------------------->
		<script src="<%=request.getContextPath()%>/js/weboffice/LoadWebOffice.js"></script>
		<!-- --------------------------------== 结束装载控件 ==------------------------------------->
	</td>
</tr>
</table>
</form>
</body>
</html>

你可能感兴趣的:(PHP,F#)