title: How to inject html into iframe, and display inside jquery-ui dialog
body: <p>Here I create a jqueryui dialog from an iframe and populate the iframe with some html.</p>
  
  <p>In firefox this displays nothing until I add the alert.  Is there a better way to convince firefox to draw the iframe?</p>
  
  <p><a href="http://jsfiddle.net/jtmx00f4/6/" rel="nofollow">http://jsfiddle.net/jtmx00f4/6/</a></p>
  
  <pre><code>function fancyDialog(htm) {
      $('&lt;iframe&gt;&lt;/iframe&gt;').dialog({
          open: function () {
              //alert('presto!');
              var doc = this.contentDocument || this.contentWindow.document;
              doc.body.innerHTML = htm;
          }
      });
  }
  
  fancyDialog('&lt;html&gt;&lt;body&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;');
  </code></pre>