expected behavior for document.getElementById(b).innerHTML=a;
<p>When I run this </p>

<pre><code>document.getElementById(b).innerHTML=a;

&lt;div class="Bb2b_hold" id="Bb2b_hold"&gt;
  &lt;?php include ("pv1.php"); ?&gt;
&lt;/div&gt; 
</code></pre>

<p>where b is a div (Bb2b_hold) in my page I want to update and a is the xhtml to update it with.  It correctly inserts the xhtml and the broswer renders the content correctly, however it leaves the previous content in the div.  I don't need the previoius content there and did not expect this to happen.</p>

<p>How can I update this code so that it removes the previous content.</p>

<p>Simply inserting this code before it does the trick but this seems a bit hacky?</p>

<pre><code>document.getElementById(b).innerHTML='';
</code></pre>

<p>My question is, is this expected behavior and also is there a "crisper" way to do this?</p>
