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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:56:29+00:00 2026-05-25T12:56:29+00:00

I have the following functionality I would like to build into a form using

  • 0

I have the following functionality I would like to build into a form using jQuery:

I have a list of values:
Invoice No: 110, Amount: 240.00
Invoice No: 111, Amount: 399.00
Invoice No: 112, Amount: 150.00

Next to each row there is a checkbox which is set to checked by default. Right at the bottom there is a textbox with the total 789.00 for the set of data. I would like to update the textbox when one of the checkboxes are de-selected & selected with the total of invoice amounts which checkboxs are checked.

The form will then be submitted to itself with the value of the textbox set.

Any suggestions welcome, as I’m a noob with jQuery.

  • 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-25T12:56:30+00:00Added an answer on May 25, 2026 at 12:56 pm

    Just answered similar question here: jQuery – Getting total depending on which checkboxes are selected

    put some css class to your invoice total span, ex: <span class="inv-total">120<span>.

    then put your checkbox inside of your invoice <div>:

    <div>
        <input type="checkbox" value="##inv if here ##" />
    </div>
    

    and then jQuery of course:

    $(document).ready(function() {
        $("input[type=checkbox]").click(function(event) {
            var total = 0;
            $("input:checked").each(function() {
                total += parseInt($(this).parent().find('.inv-total').text().substring(1));
            });
    
            if (total == 0) {
                $('#total').val('');
            }
            else {
                $('#total').val('$' + total);
            }
        });
    });
    

    I haven’t chanse to test it, but this is the idea.

    Live example: http://jsfiddle.net/dH9Eb/2/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following JQuery code which does similar functionality like Stackoverflow where the
I have a web app that I would like to have the following functionality:
I have build a game using canvas and Javascript, and I would like to
I want the following functionality using php I have a csv file. Each file
I have been searching everywhere for the following functionality in Lisp, and have gotten
I have following foreach-loop: using System.IO; //... if (Directory.Exists(path)) { foreach(string strFile in Directory.GetFiles(path,
I'd like to send an action to another object using cocoa. Ideally i would
I'm having trouble trying to get this functionality to work. I would like to
In my application, I have an iframe and I would like to give it
I have a decimal number which can be like the following: 189.182 I want

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.