0

I have CRM 2011 installed in a server and Sharepoint in another server. Both of the servers are under the same domain. Im trying to load an iframe inside a CRM 2011 HTML Web Resource with the Sharepoint I've configured. This iframe is having the known problem of the Same Origin Policy (SOP) where since both "domains" are different I can't access the contents (Being different servers). Is there someway to have the iframe communicate with the parent/top window? I already have PostMessage working correctly between them but I still have an issue that requires me to access the document inside the iframe from the parent window. Anyone know any possibility, any setting or network configuration?

I'm using IE 11 and I have also read about IE SOP Exceptions but apparently that is fixed as I've tried to include the "Trusted" sites to Trusted Zones to no success.

Community
  • 1
  • 1
  • you need to go through the parent. you can setup "REPL" event handlers to essentially let one iframe talk to another by eval()ing event.data or a fragment of it, but do be careful doing that; one-of-the-above actions on a whitelist are a better idea – dandavis Jan 07 '15 at 18:19
  • 1
    Why exactly do you need to access the document inside the iframe from the parent window? – idbehold Jan 07 '15 at 19:57
  • Somewhat interesting as to why. I use PostMessage to correctly communicate between the HTML Page and the IFrame it contains to pass data like which object was clicked/selected. The reason behind HAVING to access what inside the iframe is because after an initial click was done a document is opened in the page changing my URL to a .pdf. This makes it so no real code is loaded into this document thus making PostMessage useless. Inside this pdf a user can continue navigating through documents and I need to be able to enter the iframe and know what is being presented (what pdf is open). – Hector Tosado Jimenez Jan 07 '15 at 20:03
  • Now that you mention it though, I dont think I'll maybe have access to either the document element but I would still need to at least have permission to access the iframe and see the document that is loaded, someway or another. – Hector Tosado Jimenez Jan 07 '15 at 20:05
  • Wouldn't you be able to simply read the `src` attribute on the iframe to get that information? – idbehold Jan 08 '15 at 00:52
  • No because src of the iframe is set initially but internal navigation of the contents dont change the src. – Hector Tosado Jimenez Jan 08 '15 at 15:27

0 Answers0