JQuery Control Update Not Happening
<p>I've got a script that disables a button input control, empties a table body and then (after an AJAX call) re-populates it.  It all works fine but sometimes there are a lot of rows in the table so the browser (IE) takes a while to empty and refill it.  The strange thing is, while the rows are being emptied, the button still appears to be enabled, however if I put an alert between the button being disabled and the tbody being emptied, the button works properly, disabling visibly before the the alert comes up.  Is there any way I can get the button to update before the resource consuming table emptying process/command commences?
Thx
MH</p>

<p>Code sample, as requested (but it's not complex, so I didn't initially include it)</p>

<pre><code>$('#Search').attr('disabled', true);
$('#StatusSpan').empty();
$('#DisplayTBody').empty();
</code></pre>

<p>then I perform my AJAX call, re-enable the button and repopulate the table - if you attach that bit of code to a button and pop a 1500 line table.</p>

<p>As I mentioned, normally this is really quick and isn't a problem, but if there are, say, 1500 rows in the table it takes a while to clear down but the 'Search' button doesn't update on the screen, however if I put an alert after the .attr('disabled' line the button visibly updates when the alert box is up, but without that the button doesn't visibly disable until after the table clears (which is about 3 or 4 seconds with 1500 rows), it just stays in it's down/"mid-press" state.  I don't have a problem with the time the browser is taking to render the table changes, that's just life, but I need the users to see visible feedback so they know the search has started.</p>

<p>------further edit
Here's some code that can reproduce the problem.</p>

<pre><code>&lt;input id="Search" type="button" value="Search" /&gt;
&lt;table&gt;
    &lt;tbody id="DisplayTBody"&gt;
        &lt;tr&gt;
            &lt;td&gt;Data&lt;/td&gt;&lt;td&gt;Data&lt;/td&gt;&lt;td&gt;Data&lt;/td&gt;&lt;td&gt;Data&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p>copy the table row until you have 1500 rows, then this is the script</p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function() {
        $('#Search').click(function() {
            $('#Search').attr('disabled', true);
            //alert('l');
            $('#DisplayTBody').empty();
        });
    });
&lt;/script&gt;
</code></pre>

<p>If you uncomment the alert, you should be able to see the problem.  This occurs in both IE8 and FF, but my main problem is with IE8.  In that example, as the table is quite simple, it doesn't take long to clear the rows, but with a more complex table it takes longer and so the issue is more apparent.</p>
