Edit a specific table cell using jQuery

Edit a specific table cell using jQuery

Hi , I have table created by Json :
  1. function show(json)
  2. {
  3. var content = '<tbody>';
  4. var counter;
  5. for(counter = 0; counter < json.length; counter++)
  6. {
  7. content += '<tr><td>' +
  8.                  json[counter]['id'] + '</td>' + '<td>' + json[counter]['time'] + '<td>' + json[counter]['fullname'] + '</td>' + '<td>' + json[counter]['message'] +'</td>' +'<td>' + json[counter]['level'] +'</td>' +
  9.                  '<td><div id = ' + json[counter]['id'] + '><input type="button" id = "listbutton" value="Answer" onclick="edit(' + json[counter]['id'] + ')" ></td>' +
  10.                  '</td></tr>';
  11. }
  12. //alert(counter);
  13. content += '</tbody></table>';

  14. $('#myTable').append(content);
  15. }

I want to edit a specific cell of this table after sending a message. This message is sent like this : I click an "Answer" button on a list and a message box appears related to this table row.
What I want to do is, when the user sends message, the button disappears on the table and the message appears instead of the button. Can I do it here? :


    
  1. replymessage = "reply=" + reply + "&id=" + $("#currentUserId").val();
  2. $.ajax({
  3. type : 'POST',
  4. url : 'reply.php',
  5. data : replymessage,
  6. success : function (msg)
  7. {
  8. if(msg == '1')
  9. {
  10. //do the thing here!
  11. }
  12. else
  13. alert("A problem occured, contact system admin.");
  14. }
  15. });