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 4576572
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:13:30+00:00 2026-05-21T20:13:30+00:00

I am trying to update the table as new records come in for table

  • 0

I am trying to update the table as new records come in for table below:
enter image description here

I have got the part where I need to get live information using Ajax. I am using the <tr id = {$university}> as ids to create new rows or update existing. But the updating doesn’t seem to work. i.e. If a new student entry is made for University A, than adding a new HTML code. So my existing HTML code looks like

<tr id = "A">
    <td>A</td>
    <td>Mr. X</td>
    <td>a@b.com</td>
</tr>
<tr id = "A">
    <td></td>
    <td>Mr. Y</td>
    <td>e@f.com</td>
</tr>
<tr id = "A">
    <td></td>
    <td>Mr. S</td>
    <td>u@i.com</td>
</tr>

and when I add new data using same <tr id = "A">, it does not append information, but creates a new row:

<tr id = "A">
    <td>A</td>
    <td>Mr. Z</td>
    <td>t@t.com</td>
</tr>

will not append information but create another row in UI. How can I append new information to existing rows?

Added the js code: http://pastebin.com/4tjyUgZa

  • 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-21T20:13:31+00:00Added an answer on May 21, 2026 at 8:13 pm

    IDs in HTML are meant to be unique, you shouldn’t be duplicating them. Try using a class instead, like <tr class="a">.

    I also think you need to revisit your table structure. It looks like what you need are multiple tables, such as table “a” and table “b” that you can then append rows to. The way you are manipulating the table rows just isn’t how they’re built to work. If you had something like <table id="a"> and <table id="b"> you could then simply target those and add rows easily.

    You may also want to make use of a JavaScript framework such as jQuery. It will make manipulating the table much easier and you will be able to write the code much faster.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to update a table using LinQ. Though records are getting inserted,
I'm trying to update the comments column in one table (Entries), when a new
I have been trying to update a table in MySQL 5.0 with Coldfusion MX
I'm using Visual C# Studio 2010 express and have been trying to batch update
I have a MySQL database table containing information about places. I'm trying to fetch
I am trying to update table A with data from table B. I thought
I'm trying to update one table based on values in another table. What's wrong
I am trying to update a table according to this trigger: CREATE TRIGGER alert
Here is my trial query. I am trying to update TABLE1 table with it's
I am trying to update a column in my table which was last inserted.

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.