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

87
Visualizações
How to show/hide a textarea based on multiple radiogroups selection?

I'd like to show 1 specific textarea, whether is the first group of radios that is selected as "not okay", the second group, or if both are selected as "not okay".

I tried using this method.

const inputBox = document.querySelector('#textarea');
inputBox.style.display = 'none';

function hideShowJacks(event)
{
    const selectValue = event.target.value;
    if (selectValue === 'nok')
    {
        inputBox.style.display = 'block';
    }
    else
    {
        inputBox.style.display = 'none';
    }
}

I used the onclick attribute on both radio groups thinking that I would behave correctly, and it kinda does. But for example, If the first radio is selected as "Not Okay" (the textarea is shown), but after that I select the "Okay" option in the second group of radios, the textarea disappears, even though I selected the first one as "Not Okay".

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