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

93
Vistas
Change <select> options while the select box is in focus with Javascript

I have a login page where a html select element is updated every second to disable and/or rename the specific element.

Everything works but if you have e.g. an iPad you can focus the select element and then its not getting updated anymore until it loses the focus. And I have no idea on how to proceed from here.

that is the function which is called every second.

function editSelectMenu() {
    countedits = 2;
    const el = document.getElementById('stand');
    cams.forEach (element => {        
        if(cams[countedits - 2].shooter != ""){
            el.options[countedits].disabled = true;
            el.options[countedits].innerText = cams[countedits - 2].name + " " + cams[countedits - 2].shooter
        } else {
            el.options[countedits].disabled = false;
            el.options[countedits].innerText = cams[countedits - 2].name
        }
        countedits++;
    })
}
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