Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8134065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:52:42+00:00 2026-06-06T09:52:42+00:00

I have these text inputs in a table : <td><input type=’text’ name=’arrondi_devis_ht’ class=’calcul_total’ size=’8′></td>

  • 0

I have these text inputs in a table :

<td><input type='text' name='arrondi_devis_ht' class='calcul_total' size='8'></td>
<td><input type='text' name='arrondi_devis_ttc' class='calcul_total' size='8'></td>
<td><input type="text" name='marge_pourcent' class='calcul_total' size='5' value='20,0'></td>

I successfully get their value by performing this :

var prix_unitaire_ht=parseFloat($(this).parents("tr").find('input[name="arrondi_devis_ht"]').val().replace(',','.'));
var prix_unitaire_ttc=parseFloat($(this).parents("tr").find('input[name="arrondi_devis_ttc"]').val().replace(',','.'));
var marge_pourcent=parseFloat($(this).parents("tr").find('input[name="marge_pourcent"]').val().replace(',','.'));

So i figured i could use a similar mechanism to set their values and tried this :

$(this).parents("tr").find('input[name="arrondi_devis_ht"]').value=new_prix_ht;
$(this).parents("tr").find('input[name="arrondi_devis_ttc"]').value=new_prix_ttc;
$(this).parents("tr").find('input[name="marge_pourcent"]').value=new_marge;

Yet it does not work and their value remain unchanged. I’ve tried with .val instead of value, also to assign them an id and to do find("#id").value instead of the above without any result.

Could anyone please tell me what I’m doing wrong ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:52:45+00:00Added an answer on June 6, 2026 at 9:52 am

    You need to use that val() method to set the value of an input. This is what you are looking for:

    $(this).parents("tr").find('input[name="arrondi_devis_ht"]').val(new_prix_ht);
    $(this).parents("tr").find('input[name="arrondi_devis_ttc"]').val(new_prix_ttc);
    $(this).parents("tr").find('input[name="marge_pourcent"]').val(new_marge);
    

    Since they are all in the same row, you may want to reuse the initial selector like so:

    var $row = $(this).parents("tr");
    
    $row.find('input[name="arrondi_devis_ht"]').val(new_prix_ht);
    $row.find('input[name="arrondi_devis_ttc"]').val(new_prix_ttc);
    $row.find('input[name="marge_pourcent"]').val(new_marge);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table with a lot of text inputs like these: alt text
I have a large table of text inputs for which a set of custom
I have text input boxes. There is validation for each of the boxes using
I have these Views on which I add UILabels as text, The Views can
I have a longer text and some keywords. I want to highlight these keywords
i want a regular expression to validate string to have only text,operators and these
I have a text box in which when I type one letter say 's'
I have a table as follows : <table> <thead> <th>PRODUCT TYPE</th> <th>QUANTITY</th> <th>WEIGHT</th> <th>WEIGHT
I have a table containing user input which needs to be optimized. I have
I have a table that displays from db all infrastructures (their name, description, performance).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.