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

129
Vistas
just need simple method to insert fetch bootstrap dropdown value with input text

I just need simple method to insert fetch bootstrap drop down value with input text but showing NAN Scratching my head from a day not reaching any conclusion so if any value is selected and input text filled it should give output on same page then upon save should enter value so that it can be fetched for printing receipts. but showing NAN.Hope i get answer her as really strucked.Kindly overlook my poor English..

<div class="col-md-2">
  <div class="form-group">
    <label for="specs" class="control-label">Spec</label>
    <select class="form-select" id="specs" name="specs">
      <option selected>select</option>
      <option value="kt">Kt</option>
      <option value="ct">Ct</option>
      <option value="oth">Other</option>
    </select>
  </div>
  <input type="text" value="0" name="specsa" class="form-control text-left" placeholder="specification">
</div>
//Just for reference
specs = $('#specs').val();
specs = $obj.specs;
td.text(parseFloat(specs).toLocaleString('en-US'))
td.append("<input type='hidden' name='specs[]'    value='" + specs + "' />") //item  input
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I think you've overcomplicated it. The specific reason why you're seeing NaN (i.e. "Not A Number") is because the values in your options aren't numbers, so you cannot use parseFloat() to parse them.

This code is sufficient to read the value:

specs = $('#specs').val();
td.text(specs);
td.append("<input type='hidden' name='specs[]' value='" + specs + "' />");
about 4 years ago · Juan Pablo Isaza Denunciar
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