tags:

views:

2351

answers:

0

Hi folks,

something strange happens, when I try to update a table cell value with the returned data from an ajax call.

Considering a Table like this

<table>
  <tr>
    <th>header1</th>
    <th>Error Count</th>
  </tr>
  <tr>
    <td>useless data</td>
    <td><span id="cellToUpdate">244</span></td>
  </tr>
</table>

Within an JQuery Ajax Call, I use the following code to update the cell value

[...]
success: function(data) {
   if (data.d == "0") {
     headerParent.remove();
   }
   else {
     errorCount.text(data.d);
     headerParent.animate({ backgroundColor: '#FFFFFF' }, 450);
   }
 }
[...]

"data.d" is the json result, which is returned by an WebService. The "headerParent" is a table row, which should be deleted, if the errorcounts equals 0. The Code is working so far, but the value isn't updated.

The strange thing I encountered is, that the value is updated in the DOM, verified by selecting "show page source" in Firefox. The Browser simply doesn't render the update.

So my question is, knows anyone a jquery way to solve that issue?

best regards,

Gordon