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

235
Vistas
Form Data Select passing 'undefined'

I am having an issue with my Form Submit function

Everything is submitting as expected other than the 'Option' from my 'Select'.

It is getting passed through as 'Undefined'

I'm wondering if this is because the Options in the select are generated programmatically at runtime?

My code for the select is:

        <label for="devname">Developer Name:</label>
        <select id="devname" name="devname">
            <option  value="">Choose name..</option>
        </select><br><br>

The code i've got that generates the options is:

function populateSelect() {
    $.get('/GetDevs').done(function (devs){
        var index = 0;
        var selectme = document.getElementById('devname');
        for (index = 0; index < devs.length; ++index) {
            var dev = devs[index];
            var opt = document.createElement('option');
            opt.value = dev.Devid;
            opt.innerHTML = dev.dname;
            selectme.appendChild(opt);
        }
    });
}
populateSelect();

This successfully populates the option but as i say, when i post the form it gets passed 'undefined'

Any ideas would be appreciated

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