2017-07-06 109 views
-1

我正在使用Iframe来呈现嵌入式Docusign文档。我已成功地在Iframe上签名文档,并在签名后被重定向到指定的URL。突破Docusign中的Iframe

但重定向URL显示在IFrame内。我需要突破iframe并显示在父页面中。

我试过下面的代码片段,但无济于事。

1)个:目标= “_父” 在iframe标签

2) 如果(顶==自我)top.location.href = self.location.href;

+0

请发布您的HTML代码,向我们展示如何使用iFrame。 –

回答

0

我能找到解决方案。我只需要捕捉Iframe中的Docusign重定向并隐藏它。

<iframe id ="docusignFrame" name="docusignFrame" th:src="${docusignURL}" width="100%" height="900" onLoad="(this.contentWindow.location != '' ? DocusignCompleted(this.contentWindow.location) : void(0));"> 
</iframe> 
<script> 
function DocusignCompleted(url) { 
       $("#docusignFrame").hide();} 
</script>