0

查看 docx 文档是通过在 iframe 中启动 word 应用实现的,如下所示:

<script type="text/javascript">
function appendPreview() {
    $('<iframe src="http://xxxxx/_layouts/WordViewerFrame.aspx?id=yyyyy.docx&Source=zzzzz" style="position: fixed; height: 100%; width: 100%"></iframe>').appendTo('body');
}
</script>
<button onclick="appendPreview()">Preview</button>

执行时,Web 应用程序按预期启动,但显示“由于未知错误,Word Web App 无法打开此文档”。Sharepoint 日志显示“检测到对先前关闭的 SPWeb 对象的 SPRequest 使用。请在完成从 SPWeb 对象获得的所有对象后关闭 SPWeb 对象,但不是之前。” 如果源链接在新的浏览器选项卡而不是 iframe 中打开,则一切正常。值得注意的是,实际上只在 IE 中显示文档失败,其他浏览器会吞下这个错误。

有什么想法会出错吗?

4

1 回答 1

0

问题是我通过元指令请求 IE10 模式,而 Sharepoint 2010 只知道 IE9。

于 2013-09-09T12:16:22.240 回答