remove HTML from inside iframe using Javascript, not jQuery
<p>I have an <code>&lt;iframe&gt;</code> that is added and removed from the stage as needed. Each time I add it, it needs to load a new page.</p>

<p>I need to get it to remove the previous contents so the frame is empty while the new page is loading.</p>

<p>Here is the code involved:</p>

<p>HTML:</p>

<pre class="lang-html prettyprint-override"><code>&lt;div id='overlay' class='overlay'&gt;&lt;/div&gt; 
&lt;div id="overlay_displayer_wrapper" class="overlay_displayer_wrapper"&gt;
    &lt;div id='overlay_displayer' class='overlayDisplayer'&gt;         
    &lt;iframe id='i_displayer' class='i_displayer'&gt;&lt;/iframe&gt;     
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>This is the code that 'launches' the overlay and <code>iframe</code> above:</p>

<pre class="lang-js prettyprint-override"><code>function launchDisplayer(img_src, base_directory, session_pics){
showDisplayer(true);
document.getElementById( 'i_displayer' ).setAttribute( 'src', '' );
document.getElementById("i_displayer").src="feeder.php?call=main&amp;curr=" + img_src + "&amp;dir=" + base_directory + "&amp;pics=" + session_pics;
}
</code></pre>

<p>This is the function <code>showDisplayer()</code>:</p>

<pre><code>function showDisplayer(show){
var overlay = document.getElementById("overlay");
var overlay_displayer = document.getElementById("overlay_displayer_wrapper");
if (show){
    overlay.style.display = "block";
    overlay_displayer.style.display = "block";
}else{
    overlay.style.display = "none";
    overlay_displayer.style.display = "none";

}
}
</code></pre>

<p>That's all the code involved in this action.</p>
