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

  • Home
  • SEARCH
  • 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 8685165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:29:39+00:00 2026-06-12T22:29:39+00:00

I have this table and i can not make working the function calculator in

  • 0

I have this table and i can not make working the function calculator in the td.

The script works perfectly but when i edit the number in the cell( just clicking over the cell to get the input number), i do not get the Total Result. Can you explain which event i should apply to my jeditable plugin? Do you know maybe a different or better method to achieve that?

Thanks

  • 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-12T22:29:40+00:00Added an answer on June 12, 2026 at 10:29 pm

    You should use callback event and assign the proper event handler to calculate the total.
    Check this code which works and add more actions if think they are needed.
    Your code is very strange for me, but anyway it works.
    Function tally should be defined outside onrender $(function(){ ... }); block as a global function.

    <script type="text/javascript">
        function tally (selector) {
          $(selector).each(function () {
              var total = 0,
              column = $(this).siblings(selector).andSelf().index(this);
              $(this).parents().prevUntil(':has(' + selector + ')').each(function () {
                total += parseFloat($('p#sum:eq(' + column + ')', this).html()) || 0;
              })
              $(this).html(total);
         });
        }
    
        $(function() {
          tally('p#subtotal');
          tally('p#total');
        });
    </script>
    
    
    
    <script type="text/javascript" charset="utf-8">
    $(function() {
        $('.editable_number').editable(function(value, settings) { return(value); }, {
          type    : 'number',
          style  : "inherit",
          callback: function() {
            tally('p#subtotal');
            tally('p#total');
          }
         }
        );
    
        $('.editable_textarea').editable(function(value, settings)  { return(value); }, {
         type    : 'textarea',
         width: '200',
         height: '20',
         submit  : 'OK',
         style  : "inherit"
     });
    });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this table, which can be seen as a basic custom gantt chart:
I have a table of product information with many bit columns. This table can
I have a table. In this table have select element. How can I find
i have a table like this: Table(MissioneID, Type) Type can be 1,2 or 3
I have a table like this: Application,Program,UsedObject It can have data like this: A,P1,ZZ
Possible Duplicate: How can i made a pivot for this I have a table
I can't solve this on MS Access SQL. I have a foo table with
Problem: I have a value in a database table. This value can either contain
I have this query where I can search the TABLE_GLOBAL_PRODUCTS $catglobal_sql = select p.*,
If I have this float array declaration: float tables[10]; How can I change the

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.