【问题标题】:IE9 <a> works in directly loaded page but not working when coming via linked pageIE9 <a> 在直接加载的页面中工作,但在通过链接页面进入时不起作用
【发布时间】:2015-04-28 20:06:20
【问题描述】:

这个问题不需要跨浏览器的解决方案,因为页面将被 IE9 专门使用。

话虽如此,我正在开发一个页面(myPage),它可以访问来自不同域(linkedPage)的页面。在linkedPage 中有一个PDF 附件(pdfAttachment)。

myPage 网址:http://myDomain/files/myPage.html

linkedPage 网址:https://na13.salesforce.com/article/x.html

pdf附件 URL:https://c.na13.content.force.com/servlet/x.pdf

当用户通过window.open触发linkedPage的打开时:

window.open('https://na13.salesforce.com/article/x.html', '_blank', 'toolbar=no, scrollbars=yes, resizable=yes, top=300, left=500, width=1000, height=600');

然后单击 .pdf 附件的链接,

<a href="https://c.na13.content.force.com/servlet/x.pdf" target="_blank">Load x.pdf</a>

返回错误

Internet Explorer 无法显示该网页。

但是,如果用户直接加载 linkedPage(相对于 myPage 上的链接),pdfAttachment 加载不会出现问题。 p>

我无法控制 linkedPagepdfAttachment 页面,但可以让组控制这些主机 myPage也是最后的手段。

这是一个跨域问题吗?我并没有尝试运行脚本或操纵内容,所以我对此的理解不够深入,它似乎不适合。

是否存在可能导致该问题的 IE9 设置?

我觉得它可能与 window.open 有关,但在这里或通过其他网站找不到任何东西。 window.open 是否对其加载的页面有任何限制?

还有哪些其他可能导致此问题的原因?

谢谢大家!

其他信息

在解决此问题时,我发现我能够从 myPage 访问 linkedPage 并在具有完全互联网访问权限的系统上成功打开 pdfAttachment而其大多数用户只能访问白名单项目(其中 linkedPagepdfAttachment 都是)。

此外,当用户访问 linkedPage 本身(不是从 myPage)时,他们通过 Citrix 登录,然后登录到 Salesforce。当从 myPage 访问 linkedPage 时,只会提示他们登录 Salesforce。我不确定这是否会有所不同,因为具有完全互联网访问权限的系统在不首先通过 Citrix 的情况下仍然可以成功。

会不会有权限问题?!

@jdu - 这是标记

<body>
 <div class="knowledgePrintableView" id="knowledgePrintableView">
  <div id="articlePrintableView:j_id3:j_id4:j_id24">
   <div class="knowledgePrintableViewContent " id="knowledgePrintableViewContent">
    <div class="sectionContent">
     <table>
      <tr>
       <td class="fieldValue">
        <span id="articleX">
         <div>
           <img src="/sfc/images/docicons/doctype_pdf_16.png" alt="PDF" title="PDF" />
           <!-- Only the text node exists within the <a> tag -->
           <a href="https://c.na13.content.force.com/servlet/fileField?id=pdfAttachment" target="_blank">PDF Attachment.pdf</a>
         </div>
        </span>
       </td>
      </tr>
     </table>
    </div>
   </div>
  </div>
 </div>
</body>

【问题讨论】:

标签: javascript html internet-explorer-9 cross-domain


【解决方案1】:

在解决此问题时,我发现我能够访问 来自 myPage 的linkedPage 并在系统上成功打开 pdfAttachment 拥有完整的互联网访问权限,而其大多数用户将拥有 仅对列入白名单的项目(其中两个 linkedPage 和 pdfAttachment 是)。

嗯!然后我会把你的搜索集中在那里。您在该锚标记中使用 HTTPS 链接,并尝试通过其他一些系统进行路由。那些其他系统可能不允许 HTTPS 流量。

尝试非安全链接。

【讨论】:

    猜你喜欢
    • 2016-10-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-25
    • 1970-01-01
    • 2013-08-14
    • 2014-02-03
    • 2011-05-25
    相关资源
    最近更新 更多