Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!