Using Jquery, how do you update a row of an HTML table with the contests returned from a url?
<p>In the following code, I have a div around each row in a table that I would like to update periodically. With this code, I can call a url passing the id for each div as a parameter and get back the correct replacement html for the row from my server. Unfortunately, once I get the html back, I am unable to figure out how to properly replace the contents of each div. </p>

<p>How would you update this jquery code to update each div based on the html returned from the server? </p>

<pre><code>    &lt;table class="problems" cellspacing="0" width="900"&gt;
      &lt;tr style="color:#00ce1d;font-weight:bold;text-align:left"&gt;
        &lt;td&gt;One&lt;/td&gt;&lt;td&gt;Two&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
       &lt;div id='1' class='playerRow'&gt;
          &lt;td&gt; One&lt;/td&gt;
          &lt;td&gt; Two&lt;/td&gt;
       &lt;/div&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
       &lt;div id='2' class='playerRow'&gt;
          &lt;td&gt; One&lt;/td&gt;
          &lt;td&gt; Two&lt;/td&gt;
       &lt;/div&gt;
      &lt;/tr&gt;

    &lt;/table&gt;
</code></pre>

<p><br>
         
        </p>

<pre><code>    function updateRows() {
        var getDivs = 0;

        //iterate div with class playerRow
        $("div.playerRow").each(function() {
            alert('div id--'+this.id);
            var theDiv = $(this)

            // send ajax requrest to url encoded as div.id
            $.get('/myServerUrl?id='+this.id, function(data) {
                //The right url response comes back
                alert('div id--'+this.url+'--ajax response--'+data);

                //###### Problem area  ##########
                //Can't figure out how to view the current Div contents or update them.
                //alert('current contents ='+theDiv.html());
                //theDiv.replaceWith(data);
                //alert('current contents ='+theDiv.html());            
            });
          });
    }
    updateRows(); //The first time
</code></pre>
