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

115
Views
Weird decimals behaviour javascript Laravel

I am running across this weird issue,

So on the first input everything works correctly, but after I add the second line, when I go back and edit the first one, I cannot enter 2 decimals, it keeps bouncing.

This is how I am generating the rows on the table:

$('#postrow'+i).html("<td><input type='hidden' name='pd_id[]' value='" + (pd.id == null ? "" : pd.id) + "'><input style='text-align: right;' name='amount[]' type='text' class='number form-control amount " + numberFormat +"' id='amount" + i + "' value='" + amount + "'/></td><td><select name='pdtype[]' class='form-control pdtype' id='pdtype" + i + "'>" + htmlTypes + "</select></td><td><select name='accountcode[]' class='form-control' id='accountcode'" + i + "><option value=''>N/A</option>" + htmlCodes + "</select></td>" + applyfor + "<td>" + htmlCharges + "</td><td><input name='note[]' type='text' class='form-control' id='note" + i + "' value='" + (pd.note == null ? "" : pd.note) + "'/></td>" + removemiddle);
  $('#tblpost').append('<tr id="postrow'+ (i+1) +'"></tr>');
  $('input.number').number(true, 2);
  // $("#services"+i).focus();
  i++;
about 4 years ago · Juan Pablo Isaza
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!