title: Load iFrame after page load
body: <p>I have a PHP page with a few iFrames that cause the page to load fairly slowly. How do I go about only loading those iFrames once the page has completely loaded? I assume I need to use JavaScript but I haven't yet found a code that works.</p>
  
  <p>Many thanks.</p>
  
  <p>EDIT - The iFrame needs to appear within a PHP echo.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>&lt;?php
              while($i = mysql_fetch_array($e))
              {
          ?&gt;
  
      &lt;div class='dhtmlgoodies_question'&gt;
          &lt;div style='float:left'&gt;&lt;img src='../images/categories/&lt;?=$i[Category]?&gt;.png'&gt;&lt;/div&gt;
          &lt;div class='name'&gt;&lt;?=$i[Name]?&gt;&lt;/div&gt;
          &lt;div class='location'&gt;&lt;?=$i[Area]?&gt;&lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class='dhtmlgoodies_answer'&gt;
      &lt;div&gt;
  
          &lt;div style='background-color:#FFF; margin-left:248px; padding:10px; color:#666'&gt;
          &lt;?=$i[Address]?&gt;&lt;br&gt;
          &lt;?=$i[Area]?&gt;&lt;br&gt;
          &lt;a href='http://maps.google.com/maps?q=&lt;?=$i[Postcode]?&gt;'&gt;&lt;?=$i[Postcode]?&gt;&lt;/a&gt;&lt;
          &lt;p&gt;
          &lt;?=$i[ContactName]?&gt;&lt;br&gt;
          &lt;?=$i[TelephoneNumber]?&gt;
          &lt;/div&gt;
          &lt;p&gt;
          &lt;a href='http://crbase.phil-howell.com/view.php?Employer=&lt;?=$i[Employer]?&gt;'&gt;
          Edit this entry
          &lt;/a&gt;
          &lt;br&gt;
  
      //HERE IS WHERE I WANT TO LOAD THE iFRAME
  
  
      &lt;/p&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
          &lt;?php
              }
          ?&gt;
  </code></pre>