IE9 <a> works in directly loaded page but not working when coming via linked page

时间:2015-04-28 20:06:20

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

This question does not need a cross-browser solution as the pages will be exclusively used by IE9.

With that said, I have a page ( myPage ) being developed that accesses a page from a different domain ( linkedPage). Within the linkedPage there is a PDF attachment ( pdfAttachment ).

myPage URL: http://myDomain/files/myPage.html

linkedPage URL: https://na13.salesforce.com/article/x.html

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

When a user triggers the opening of the linkedPage via window.open:

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

and then clicks on the link for the .pdf attachment,

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

it returns the error

Internet Explorer cannot display the webpage.

However, if the user loads the linkedPage directly (versus from a link on myPage), the pdfAttachment loads without issue.

I do not have control over the linkedPage or pdfAttachment pages but it may be possible to have the group that does control those host myPage as well as a last resort.

Is this a cross-domain issue? I'm not trying to run scripts or manipulate the content so with my less than robust understanding of that, it doesn't seem to fit.

Are there settings for IE9 that could be causing the issue?

I feel like it might be related to the window.open but was unable to find anything here or through other sites. Does window.open put any limitations on the page it loads?

What other possible things could be causing this issue?

Thanks to all!

ADDITIONAL INFORMATION

When troubleshooting this, I discovered that I was able to access linkedPage from myPage and open pdfAttachment successfully on a system with full internet access while the majority of its users will have limited internet access to whitelisted items only (of which both the linkedPage and pdfAttachment are).

Also, when users access the linkedPage by itself (not from myPage) they login through Citrix and then login to Salesforce. When the linkedPage is accessed from myPage they are only prompted to login to Salesforce. I'm not sure if that makes a difference, since systems with full internet access are still successful without first going through Citrix.

Could there be any permission issues?!

@jdu - here is the markup

<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>

1 个答案:

答案 0 :(得分:0)

  

对此进行疑难解答时,我发现我能够访问   来自myPage的linkedPage并在系统上成功打开pdfAttachment   完全上网,而其大多数用户将拥有   有限的互联网访问只有白名单项目(其中两个   linkedPage和pdfAttachment是)。

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

尝试使用非安全链接。