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

151
Views
What revision of the Browser/Javascript specification is causing a change in selected table cell

In 2016 I wrote a Javascript function for a web application (flyatlas2.org) that does the following:

If you click in a cell in Table 1, it highlights the appropriate column in Table 2.

This is illustrated by the the left screenshot below, which is an example the user can view and check here.

Screen shot of different table highlighting

It was taken under Mac OS X Mojave with the Safari (v.14.1.2) web browser, although Chrome (103) behaves the same way, as does Edge on Windows 10 (Education 21H2 64 bit running in emulation).

However, under Mac OS X Mojave with Firefox (v.101), all these browsers on Mac OS X Monterey, and Chrome (v.103) or Firefox on Windows 10 , the column highlighted in the lower table is that headed Ag (Accessory glands), not Cs (Carcass), as shown on the right. (I was alerted to the problem by someone running Windows on a PC rather than in emulation on a Mac.)

So something must have changed in the browser interpretation of Javascript. But what?

My code is below (the top table is geneTable, the bottom one transTable):

function hiliteTrans(geneCellID, geneTableID)
{  
    clearBordersT();  // removes borders from any previous selection
    // IDs follow underscore
    var transTableID = "tabTrans" + geneTableID.substring(geneTableID.indexOf("_"));
    geneCellID = geneCellID.substring(geneCellID.indexOf("_") + 1);
    var transTable = document.getElementById(transTableID); 
    for (var i=1; i<transTable.rows.length; i++) // modified for two name rows
    {
        for (var j=2; j < transTable.rows[i].cells.length; j++)
        {
            if(j-1==geneCellID) // modified for two name cells
            {
                if(i==1)
                {
                    transTable.rows[i].cells[j].classList.add("highlightT");
                }
                else
                {
                    transTable.rows[i].cells[j].classList.add("outlineT");
                }
            }
        }
    }  
}
about 4 years ago · Juan Pablo Isaza
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!