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

263
Views
Getting values of row in table using Javascript

I'm trying to get information from a table I have populated into. I got this code :

> dataHtml += `<tr onclick="getRowDetails(this)" class='accordion'
> id="accordion"> onclick="newAssign(this)"><td>${course.Year}</td><td>${course.Semester}</td><td>${course.Route}</td><td>${course.CourseName}</td></tr>`;

and once the row is clicked this function is triggered:

function getRowDetails(value) {
            console.log("showing this")
            console.log(value)
        }

and once I click on the row i see the following information: enter image description here

My question is how do I approach this if I want to show the value "Big Data" only?

thanks !!

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Like this:

      function getRowDetails(value) {
        /* for (let i = 0; i < e.children.length; i++) {
          console.log(e.children[i].textContent);
        } */
        console.log(value.children[3].textContent);
      }
about 4 years ago · Juan Pablo Isaza Report

0

var row = $(value); 
var text = '';
for (var i = 0, col; col = row.cells[i]; i++) {
    if(col.innerHTML == 'Big Data')
        text = col.innerHTML;
          alert(text);
        }

the syntax may be wrong, i didn't try but i guess you can solve it like this.

about 4 years ago · Juan Pablo Isaza 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!