开发者

How can i append a new row to the existing conversation without refreshing the page using ajax?

I have a tr with attribute as a unique id. How do i add a new tr when a user from ano开发者_StackOverflowther account replies and i can see the reply without refreshing the page?


didnt get ya completely but to append a new tr to a specific tr you can use

$('#trUniqueId').append(
      $('<tr/>').attr("id","newtrId")
);


Try this

$(‘ tblDoc tr:last’).after(

 "<tr><td  style=’width:150px;’>value1</td><td  style=’width: 150px’>value2</td><td  style=’width: 150px’></td></tr>"


);


Alfred is correct, your question is very vague.

However, to add a new row (newID) after the existing row (uniqueID), use the following code:

$('#uniqueID').after('<tr id="newID">' + CELL CONTENT + '</tr>');

As for pulling in the information via Ajax, we'll need to see code samples.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜