title: Executing javascript from within an iframe
body: <p>I have:</p>
  
  <ol>
  <li>A web server (server 1)</li>
  <li>An application server running some beast of a legacy web app (server 2)</li>
  <li>An iframe on server 1 pulling in the application from server 2</li>
  </ol>
  
  <p>My problem is:</p>
  
  <p>The legacy app uses JS validation on its forms. When a user attempts to submit an incomplete form, an alert pops up to notify the user that they are a dummy. Of course, this fails when the app is run inside of an iframe because server 1 and server 2 live at different domains.</p>
  
  <p>I tried setting the following proxy directives on server 1:</p>
  
  <pre><code>ProxyPass /legacy_app http://server2.url/legacy_app
  ProxyPassReverse /legacy_app http://server2.url/legacy_app
  </code></pre>
  
  <p>I'm now able to serve the iframe from <a href="http://server1.url/legacy_app" rel="nofollow noreferrer">http://server1.url/legacy_app</a>, but I'm still unable to execute javascript inside that iframe -- I get the same security/access errors as I did when the app was running on a different domain.</p>
  
  <p>Is there something else I can try?</p>