A HREF Modify the value causes the nested element inside A tag to be deleted
<p>The following A HREF element modified through the jquery deletes the nested IMG element .</p>

<pre><code>&lt;table id="newHead" width="90%" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC" style="display: none;border: 1px #000066 groove;"&gt;
    &lt;tr height="25px"&gt; 
        &lt;td style="text-align: center;padding-left: 10px;"&gt;&lt;strong style="white-space: nowrap; font-size: 12px; "&gt;
        &lt;font color="#000066"&gt; Report&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt; &lt;a id="url" href="mmRep.do?action=getXLSummReport&amp;reportId="&gt;&lt;img align="right" hspace="850px" src="images/graph_bar/graph_Excel.jpg" width="25" height="25" border="0"&gt; &lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>This  jquery removes the nested IMG element(

)</p>

<pre><code>var newurl = $("a#url").attr("href") + reportId;
$("a#url").attr("href",newurl);
</code></pre>

<p>After i modify the href attr value, the html becomes likes this, the img element vanishes</p>

<pre><code>&lt;td&gt; 
&lt;a id="url" href="mmRep.do?action=getXLSummReport&amp;reportId=75"&gt;
&lt;/a&gt;
&lt;/td&gt;
</code></pre>
