Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

152
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda