Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

90
Visualizações
Making an input form inaccessible and have cursor jump to next input form

I am working on a project for journalising registrations on teeth but encountered a problem.

In the start of the registration I have made toggle buttons, for registering if the tooth is present in the mouth or not. After this comes a series of input type=text elements connected to the giving tooth, these can only receive 1 digit input, before having a focus() function shift the cursor to the next input form.

However, I need the input forms to disappear and be inaccessible for the user, and on the same time make the cursor jump to the next accessible input element, without having the user clicking or pressing anything.

I was thinking of having the toggle button insert specific value into the input forms, and then make a function which makes the cursor skip boxes with the giving value.

// Script for removing tooth object 
function TS_8p() {
  var t = document.getElementById("Tooth_present");
  t.classList.toggle("no_molar_OK");
}

// script for setting specific value into input 

function no_PD_CAL(val) {
  document.getElementById('2').value = val;
}


// script for making cursor automove inbetween inputs 

function jump(field, automove) {

  if (field.value.length >= field.maxLength) {
    document.getElementById(automove).focus();
  }

};

function jump_inaccessible() {
  if (field.value = "¤") {
    document.getElementById(automove).focus();
  }
}
<button type="button" class="molar" id="Tooth_present" onclick="TS_8p();no_PD_CAL(this.value)" value="¤"> tooth </button>
<input type="text" id="1" class="PD_CAL_box text-center" maxlength="1" onkeyup="jump(this, '2')" />
<input type="text" id="2" class="PD_CAL_box text-center" maxlength="1" onkeyup="jump(this, '3'); jump_inaccessible(this, '4')" />
<input type="text" id="3" class="PD_CAL_box text-center" maxlength="1" onkeyup="jump(this, '4')" />

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda