Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
Update entire HTML table column using JS

I want to update entire column with new_data

I tried to update as bellows

 response.json().then(function (new_data){
        console.log(new_data)
       
        var body_data = " ";

        new_data.forEach((item) => {
        var list_data = "";
        list_data += "<td>" + item.vc_state + "</td>";
        body_data += list_data;
        });

        $('#vc_state').html(body_data);  })

But it update only the cell as bellows enter image description here

I want to update entire State column with new data

Please help me to solve this

Updated

I updated as follows

 response.json().then(function (data){
        console.log(data)
        var body_data = " ";
        data.forEach((item) => {
        var list_data = "";
        list_data += "<td>" + item.vc_state + "</td>";
        $('#vc_state').replaceWith(list_data);
      });

It worked. But it changed the HTML only once . I need to update HTML when I call the function without refreshing the page

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

watch table infor with w3c will help you. table>thead|tbody>tr>td|th.

about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!