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

95
Vistas
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 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