How can I read the loaded scripts in an Iframe?
I want to echo the variables outside the iframe and use the variables in script.js out of the iframe.
My code:
<script type="text/javascript">
  var myIFrame = document.getElementById(ifr_id);
  var script = myIFrame.contentWindow.document./*script.js*/;
</script>
In the Iframe's <head>: <script type="text/javascript" src="script.js"></script>.
script.js:
$rootScope.texts = {
  content : 'inceptos suspendisse etiam tempor posuere volutpat tempor dapibus varius nullam sagittis nibh amet in mattis quisque, conubia tempor at eros turpis erat, phasellus tincidunt tristique nisl.', 
  copyright       :   '--- © 2014 RobbieWilliams Interactive. All rights reserved.',
};
- how can i load <script>'s into an iframe? (but I want the opposite)
 
     
     
     
    