title: Iframe with dynamic content
body: <p>I need to build a page like this <a href="http://dojo.telerik.com/" rel="nofollow">http://dojo.telerik.com/</a>, everything works except the Javascript I give in the iframe. Basically I generate my complete page in HTML and give it to the iframe src attribute like this:</p>
  
  <pre><code>var content = '&lt;html&gt;&lt;head&gt;'+headContent+'&lt;/head&gt;&lt;body&gt;'+bodyContent+'&lt;/body&gt;&lt;/html&gt;';
  document.getElementById('frame').src = "data:text/html;charset=utf-8,"+escape(content);
  </code></pre>
  
  <p>For example a "alert()" will work, but loading a js file like:</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>will not work, even if the file is local. I specify that all the js is in the head tag.</p>
  
  <p>What happen? Is it the way I give the content to the iframe that is not correct?</p>
  
  <p>Thanks in advance</p>