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

87
Views
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
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!