javascript jquery response HTML into a div do not retrieve all HTML
<p>I am doing a Ajax call with jquery and putting the content inside a div like this:</p>

<pre><code>$('#replace').html(response);
</code></pre>

<p>But it is not replacing all the content I got from 'response'.</p>

<p>When I do :</p>

<pre><code>alert(response)
</code></pre>

<p>I see all the HTML code with no problem.</p>

<p>But when I do:</p>

<pre><code>$('#replace').html(response);
</code></pre>

<p>It does not put all the HTML code from response.</p>

<p>When I do an alert</p>

<pre><code>alert(response);
</code></pre>

<p>I got this (which is correct):</p>

#

<pre><code>    &lt;div id='replace'&gt;      
            &lt;tr onclick='javascripot:gravaJOBparaView(5746);' ondblclick='fnOpen(5746);' &gt;
                      &lt;td class='preview' title='8746' &gt;8746&lt;/td&gt;
                      &lt;td&gt;XXXX&lt;/td&gt;
                      &lt;td&gt;xxxxx&lt;/td&gt;
                      &lt;td&gt;xxxx&lt;/td&gt;
                      &lt;td&gt;xxx&lt;/td&gt;
                  &lt;td&gt;xxxxx&lt;/td&gt;
                  &lt;td title='xpto'&gt;XXXXXX&lt;/td&gt;
                  &lt;td&gt;&lt;/td&gt;
                  &lt;td&gt; &lt;br/&gt;18:00&lt;/td&gt;
                  &lt;td&gt;22/07/2012&lt;/td&gt;
                  &lt;td title='Check XXXXX' class='popups' &gt;&lt;a href='#popup_5746'&gt;&lt;img src='xpto.png'  alt='Check XXXXXX' width='40px'&gt;&lt;/a&gt;&lt;/td&gt;

        &lt;/tr&gt;   
  &lt;/td&gt;
</code></pre>

<p></p>

#

<p>But When I do the:</p>

<pre><code>$('#replace').html(response);
</code></pre>

<p>It puts this code in the div 'replace':</p>

#

<pre><code>   &lt;div id="replace"&gt;       

                  8746
                  XXX
                  XXXX
                  XXXX
                  XXXXX
                  XXXXX
                  RXXXXXX

                   &lt;br&gt;18:00
                  22/07/2012
                  &lt;a href="#popup_5746"&gt;&lt;img width="40px" alt="Check XXXXX" src="xxxxxx.png.png"&gt;&lt;/a&gt;
  &lt;/div&gt;
</code></pre>

#

<p>As you can see for some reason it does not put all the tags from response.</p>

<p>What should I do?</p>
