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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:57:23+00:00 2026-06-05T22:57:23+00:00

Thanks to some help I received yesterday I’ve got some dynamic summing working on

  • 0

Thanks to some help I received yesterday I’ve got some dynamic summing working on an HTML table based on user input and selections from a select menu. I’ve run into one problem though that’s stumped me. If you look at my jsfiddle:

http://jsfiddle.net/fmdataweb/T5xtL/13/

if you enter data as follows:
Row 1: Fruit= Apple Qty = 100
Rwo 2: Fruit= Banana Qty = 200

Everything works as expected for the totals:

Total Apples 100
Total Bananas 200

If you now change Row 1 Fruit selection from Apple to Banance the sub totals are now:

Total Apples 100
Total Bananas 300

The Bananas total has updated correctly but the Apples total hasn’t changed – it should now be zero/0.

Any ideas what this is happening?

  • 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-05T22:57:25+00:00Added an answer on June 5, 2026 at 10:57 pm

    Update: Here’s a jsFiddle of what I meant since it was unclear before

    At the beginning of the calc function you should reset everything back to zero. The issue is that you only reset to zero if one of the fruits is selected in a drop down. In your case apple wasn’t selected so it was never reset! Hope this helps.

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

Sidebar

Related Questions

This question is related to another question of mine. Thanks to some help I
Thanks for taking some time to help me out. Using: Microsoft Visual C# 2010
I based a custom menu on some code I once received. It looks OK,
I'd like some help with the following jQuery code if possible... $(document).ready(function() { $('table.sortable').each(function()
Hey all, Earlier I received some help toggling between three hidden divs in a
I am new to this repository lark, so some help is gratefully received. I
I just received some really great help today with a prior jQuery problem and
Thanks to help I previously received on this forum I was able to get
Alright, I have received some helpful information on this personal site I am working
Thanks to some great folks on SO, I discovered the possibilities offered by collections.defaultdict

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.