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

130
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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