Comment reply procedure using jquery and php?

Posted by Prashant on Stack Overflow See other posts from Stack Overflow or by Prashant
Published on 2009-07-18T04:41:43Z Indexed on 2010/05/15 3:54 UTC
Read the original article Hit count: 383

Filed under:
|
|
|
|

I have Commenting system in my app. For a single video entry anyone can post a comment and someone else can post reply to that comment and replies, cannot have thier further reples, similar to StackOverflow is doing (1 Answer, and thier 1 or more replies).

I want the similar functionality what SO has, Let's I have the following HTML

<div class="comment" id="comment-908">
  First comment
</div>
<div class="reply">
  <div id="reply-909>
     reply 1
  </div>
  <div id="reply-910>
     reply 2
  </div>
  <div id="reply-911>
     reply 3
  </div>
</div>
<form id="reply-form">
  <textarea id="replycomment" name="replycomment"></textarea>
  <input type="submit" name="submit-reply" value="add reply" />
</form>

Now above HTML is a sample which I have created, When someone will click on "add reply" button then I am using jquery to post there reply.

Now I want to know that there will be multiple comment and multiple add reply forms. So who clicks on which button and for which comment someone wants to post a reply, how will i know that?

The above HTML is not in correct way, please suggest me the correct HTML flow which I can use and how to work with jquery?

now I want to know when soe

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about html