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

151
Vistas
Javascript sorting, issue with filtering by integer

My script should be removing everything that doesn't match the value of the selected term from the drop-down list. However, it doesn't seem to be filtering at all. I'm using the exact same code for 2 other drop downs and only the term is causing issues. You can see the term is clearly present for each program on the demo page.

https://www.harpercollege.edu/dev/whoward-dev-area/open-class-list-dev.php

function detectChange5(termlist) {
   var select5 = document.getElementById('termlist');
   var keyword5 = select5.options[select5.selectedIndex].value;
   var clubDivs5 = document.getElementsByClassName('filtergroup');
   for (var f = 0; f<clubDivs5.length;f++) {
      if (clubDivs5[f].innerHTML.trim().indexOf(keyword5) === -1) {
         clubDivs5[f].style.display = "none";
      } 
      else {
            clubDivs5[f].style.display = "table-row";
      }
   }
}
<select id="termlist" onchange="detectChange5(this)">
<option value="None">Term</option>
}
<option value="202265">Spring</option>
<option value="202295">Summer</option>
<option value="202335">Fall</option>
</select>

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