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 262029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:28:53+00:00 2026-05-11T22:28:53+00:00

I have a listview with lists lines of an invoice (Which are editable), each

  • 0

I have a listview with lists lines of an invoice (Which are editable), each invoice line has a qty and a rate and I want to show the line total on the client show so if the qty or rate is changed the total changes before the postback.

I have applied the below which gives the right result but doesn’t work with multiple line items. The qty and rate fields have a class name of decimal and when they leave focus it will update the line total as per below but I need to restrict it to only update the total of the current line which it doesn’t but inputs the total value of all lines with the sum of the first entry.

$(".decimal").blur(function() {           
       $(".total").val($(".qty").val() * $(".rate").val());

    });
  • 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-05-11T22:28:54+00:00Added an answer on May 11, 2026 at 10:28 pm

    It should be possible to do this, but we’d need to see how your HTML is set up to recommend specific code.

    Basically, in the function called when the blur event is fired, you have access to $(this), which will represent the particular field on which the blur event occurred. You should be able to use jQuery selectors to set the total for the particular field that has the .total class and is in the same line as $(this).

    An example: if your HTML looked like this:

    <div>
         <input type="text" class="decimal qty"> <input type="text" class="decimal rate"> <input type="text" class="total">
    <div>
    

    (repeated, of course, for the various rows)

    Then the target total field will always be a sibling of the triggering decimal field, so, for example, you could do

    $(this).parent().filter(".total").val(//and set your values here)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListView which displays a list of string values. I want to
I have a ListView that has one image and two lines of texts for
I have a ListView where each row has a fixed height. Every row contains,
I want to show multiple lines with different text styles for each item in
I have a listview with the names of the email lists (on import it
I have a ListView with multiple checkboxes (one for each list item). What would
I have a listview that contains values from webservice.Each page contains only 10 listitems
I have a ListView on each row i have a LinearLayout with some objects
I have one custom ListView called AreasListView which I've included in the XML file.
I have a problem with my listview which contains an ImageView and a few

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.