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

Related Questions

I want add label to every row in tableview at right side of the
I want to add two maps together with the following behavior. if key exists
I have two variables, key and value , and I want to add them
I want to create registry key through java program to add the jar file
I want to create a greasymonkey script, which will add a shortcut key for
I'm using a key up handler to add and remove event handlers depending on
I want to add a keydown event listener to the document object without JQuery.
I want add UIGestureRecognizerDelegate to UIWebView,but failed. if [self.view addsubView:webView]; So UIWebView is ok,but
I want add new Feed item on entity persist and update. I write this
I want add my custom sidebar next right column all page. Please check this

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.