title: Running Javascript in an iframe from a different domain
body: <p>I'm working on a website that uses iframes from another company to display a list of documents. The documents are paginated under a number of tabs ("All, Presentations, Reports", etc). If I use this  element as an example:</p>
  
  <p><code>&lt;iframe id="frame" src="www.different-domain.com">&lt;/iframe></code></p>
  
  <p>... is there a way I can open a specific tab, upon page load? So, if I want to open up a page with "Presentations" loaded, rather than "All" (the default), can I use Javascript/jQuery to accomplish this?</p>
  
  <p>The tabs inside the  use Javascript to generate a list of all of the items, like this:</p>
  
  <p><code>&lt;a href="javascript:loadPresentationData()">Presentations&lt;/a></code></p>
  
  <p>I can't simply run this:</p>
  
  <p><code>document.getElementById('frame').contentWindow.loadPresentationData();</code></p>
  
  <p>... as I will get 'Permission denied to access property 'loadPresentationData'.</p>
  
  <p>If I open the iframe src in a new browser tab, go to the console, and type 'loadPresentationData();', it works perfectly, though!</p>
  
  <p>Is there any other way I can just get the tab to open upon page load, without having to contact the developers of the frame (this was supposed to be finalised already).</p>
  
  <p>If I did have to contact them, what would I need to ask them to do, so that I could open the tab upon page load?</p>
  
  <p>Thanks very much.</p>