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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:19:16+00:00 2026-05-11T08:19:16+00:00

I want add a key up event to every text box element in a

  • 0

I want add a key up event to every text box element in a table excluding the last text box in each row. The table is dynamic on both axis.

The key up event will total the values in all but the last text box. The total is then placed in the last text box for the row.

The script for the totaling and setting the total all works fine.

I tired the following to select the target elements:

$('#Grid tr input:text:not(:last)').keyup(function(){     //do total stuff here }) 

Unfortunately it works as documented and not as I wanted and selects all but the very last checkbox.

Ideally the solution will not involve any further markup to the table example below or involve any looping. However if that is what it takes, so be it.

<table id='Grid'>     <tr id='r1'>         <td>Row 1</td>         <td><input type='text' id='txt_a1_b1'></td>         <td><input type='text' id='txt_a1_b2'></td>         <td><input type='text' id='txt_a1_b3'></td>         <td><input type='text' id='txt_a1_b4'></td>         <td><input type='text' id='total_a1'></td>     </tr>     <tr id='r2'>         <td>Row 2</td>         <td><input type='text' id='txt_a2_b1'></td>         <td><input type='text' id='txt_a2_b2'></td>         <td><input type='text' id='txt_a2_b3'></td>         <td><input type='text' id='txt_a2_b4'></td>         <td><input type='text' id='total_a2'></td>     </tr>     <tr id='r3'>         <td>Row 3</td>         <td><input type='text' id='txt_a3_b1'></td>         <td><input type='text' id='txt_a3_b2'></td>         <td><input type='text' id='txt_a3_b3'></td>         <td><input type='text' id='txt_a3_b4'></td>         <td><input type='text' id='total_a3'></td>     </tr> </table> 

One final point, the total text box does need to be a text box as there is also a requirement to enter a total then split it across the row and I do not want a key up function in the total text box.

  • 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. 2026-05-11T08:19:16+00:00Added an answer on May 11, 2026 at 8:19 am

    I’m surprised noones quite got this yet:

    $('#Grid tr :not(:last-child) :text').keyup(function(){     //do total stuff here }) 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 236k
  • Answers 236k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Classes that are bundled with PHP don't tend to just… May 13, 2026 at 6:22 am
  • Editorial Team
    Editorial Team added an answer Use the Carbon Event Manager's RegisterEventHotKey function. This function is… May 13, 2026 at 6:22 am
  • Editorial Team
    Editorial Team added an answer I think this could be related to the caching of… May 13, 2026 at 6:22 am

Related Questions

Lets say I have the following 2 tables in a database: [Movies] (Scheme: Automatic)
I am building an application that includes a feature to bulk tag millions of
I am writing an application in JavaScript (with JQuery). The application has a lot
I have a strange issue. I'm trying to get Apple Push Notifications working with

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.