Is there a fast way to replace a large tbody in IE?
<p>I need to replace a <code>tbody</code> with new Html using the jQuery below. The .empty() function hangs when the Html is above 1Mb.</p>

<pre><code>$("#searchForm").submit(function (event) {
    event.preventDefault();
    //$("#myTable tbody").empty();
    $.post($(this).attr('action'), $(this).serialize(), function (data) {

        //$("#myTable tbody").html(data);
        replaceTableBody("thebody", data);

    });
});  
</code></pre>

<p>I'm not worried if it's a tricky solution, I just want it to work...<br>
I tried this but could not get it to work: <a href="http://ajaxian.com/archives/replacehtml-for-when-innerhtml-dogs-you-down" rel="nofollow">replacehtml-for-when-innerhtml-dogs-you-down</a>.  </p>

<p>It only needs to work in IE.   </p>

<p><strong>EDIT</strong>  </p>

<pre><code>    var replaceTableBody = function(tbodyId, html){
        var temp  = document.createElement('div');
        temp.innerHTML = '&lt;table&gt;&lt;tbody id="thebody"&gt;'+html;
        var tb = document.getElementById(tbodyId);
        tb.parentNode.replaceChild(temp.firstChild.firstChild, tb);
        temp = null;
    };
</code></pre>
