2013-06-28 51 views
1

我有一个JSP文件中的iFrame来显示PDF文件,因为我将此页面包含在另一个JSP文件中并尝试显示相同的文件。它在Firefox中正常工作,但在Chrome和IE中无法正常工作。这里通过我附加了脚本和html内容。iFrame浏览器问题,同时在另一个JSP文件中包含一个JSP文件

脚本:

function displayAttachmentInIframe(attachmentPath) 
{ 
    var iframeElementId = '#employeeDetailsAttachmentDisplayIFrame'; 
    var iframeElementStyleClass = 'margin-top: 0px; width: 600px; height: 400px; 
    border:0px; overflow-x: hidden;'; 
    jQuery(iframeElementId).attr('src', attachmentPath); 
    jQuery(iframeElementId).attr('style', iframeElementStyleClass); 
} 

HTML代码:

<iframe id="employeeDetailsAttachmentDisplayIFrame"/> 
<h:graphicImage id="employeeDetailsAttachmentImage" 
       url="#{EmployeeDetails.attachedFilePath}" 
       alt="Attachment Not Found" 
       style="width: 580px; height: 400px;" /> 

回答

0

chromeIE,你可能不会,除非用户确认其加载http://里面的内容https://页面直接。确保您的https://网址拥有SSL证书。您可以检查chrome console中的错误。

相关问题