title: content of dynamically created iframe is empty
body: <p>On my localhost, I am using the following JavaScript to create an <code>iframe</code> with <code>src</code>, and add it to the document:</p>
  
  <pre><code>$('#preview').html('&lt;iframe src="http://google.com/"&gt;&lt;/iframe&gt;');
  </code></pre>
  
  <p>The iframe shows but not the content. In firebug, it's just:</p>
  
  <pre><code>&lt;iframe src="http://google.com/"&gt;
      &lt;html&gt;
          &lt;head&gt;&lt;/head&gt;
          &lt;body&gt;&lt;/body&gt;
      &lt;/html&gt;
  &lt;/iframe&gt;
  </code></pre>
  
  <p>When I execute <code>$('iframe').attr('src','http://google.com/');</code> on the console, the browser loads (says "Waiting for google.com..."), then seems to refresh the content of the iframe. But again, it's empty.</p>
  
  <p>If I set it to a local page, though, the content is loaded.</p>
  
  <p>Is this because of the same origin policy? I'm not so informed about it. I did some googling and I'm confused because some sites say that it's okay to include an iframe with src that doesn't belong to your own domain, and some say it's not possible.</p>
  
  <p>By the way, since I'm still testing on localhost, would this work if I uploaded this to a server somewhere? (but src of iframe will still be in a different domain)</p>
  
  <p>Help?</p>