title: jQuery UI dialog in a cross-domain iframe
body: <p>I have an iframe with a long content. I have links that will pop-up jQuery UI dialog. The problem is that the dialog pops up in the center of the iframe, and not in the center of current viewport as in case without the iframe.</p>
  <p>I have found several solutions:</p>
  <ul>
  <li><a href="https://stackoverflow.com/q/15955595/684229">JQuery UI Dialog inside of an iframe</a></li>
  <li><a href="https://stackoverflow.com/q/2773669/684229">positioning a jquery dialog that is inside an iframe realtive to the parent window</a></li>
  <li><a href="http://www.alexdeveloper.com/blog/2012/4/17/iframe-and-jquery-ui-dialog-window-inside-how-to-show-it-centered" rel="nofollow noreferrer">http://www.alexdeveloper.com/blog/2012/4/17/iframe-and-jquery-ui-dialog-window-inside-how-to-show-it-centered</a></li>
  </ul>
  <p>Unfortunatelly none of these work in cross-domain context - I always get <code>Permission denied</code> javascript error because the child iframe tries to access the parent window.</p>
  <h2>Are there any solutions to this problem?</h2>
  <p>Can I for example parent allow a befriended <code>iframe</code> to access its properties? I tried it by setting the <a href="http://www.w3schools.com/tags/att_iframe_sandbox.asp" rel="nofollow noreferrer"><code>sandbox</code> attribute of <code>iframe</code></a> to <code>&lt;iframe ... sandbox=&quot;allow-same-origin&quot;&gt;</code> , but it didn't help. The <code>iframe</code> is a trusted son of the parent page! There must be a way to say</p>
  <pre><code>OK my son, I trust you, you can access all of my properties!
  </code></pre>