Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 310265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:49:03+00:00 2026-05-12T07:49:03+00:00

I have Commenting system in my app. For a single video entry anyone can

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:49:03+00:00Added an answer on May 12, 2026 at 7:49 am

    Change the HTML form to something similar first:

    <form class="reply-form" action="url/to/submit/123456" method="post">
        ...
    </form>    
    

    The reason behind this is, you cannot have same id for more than one element, so, to simplify the problem, you can just make all reply form to be in class reply-form (which is straightforward). Adding the form action with the id is also a good practice so that even your client don’t have javascript/ajax enabled, it can still functional when clicking on the submit button.

    And then, the rest of the work would be (suppose your form is ajax submit):

    $(".reply-form").each(function(){
        var form = $(this);
        var submitUrl = form.attr("action");
        $("input:submit", form).click(function(){
            // implement the submit logic here.
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a requirement to add commenting system to a page (similar to 'Post
I am building a commenting system where people can comment on uploaded files, messages
I'm working on a commenting system that uses Markdown and I want to have
I want to use Markdown for my website's commenting system but I have stumbled
i have a commenting system where i am storing the News ID in the
I have a Wordpress blog and the only user input is the commenting system.
I have a new web app that is packaged as a WAR as part
Hey Guys, I'm setting up a commenting system for a group of sites that
I have tweets and commenting system like this This is the code block for
In my application i have a threaded commenting system which i call status messages.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.