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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:31:29+00:00 2026-06-15T05:31:29+00:00

Trying to total some values on focusout (blur or lost focus) for some input

  • 0

Trying to total some values on focusout (blur or lost focus) for some input fields using jQuery.

Below is the function I am using, but the ‘newAmount’ alerts completely blank no matter what is found in the input when the event is fired:

//update personnel list total on blur
$('.personnel-list').focusout(function(){
    var currTotal = $('#personnel-office-total').val();
    var newAmount = $(this).val();
    var newTotal = currTotal+newAmount;
    $('#personnel-office-total').val(newTotal);
    alert(currTotal);
    alert(newAmount);
});

<li><label for="personnel-office-other">Other</label><input type="text" class="small-input personnel-input" name="personnel-office-other-dummy" id="personnel-office-other" /></li>
<li><label for="personnel-office-total">Total <em class="formee-req">*</em></label><input readonly="readonly" type="text" class="required small-input" name="personnel-office-managers-total" id="personnel-office-total" value="0" /></li>
  • 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-15T05:31:30+00:00Added an answer on June 15, 2026 at 5:31 am
    $('.personnel-input').focusout(function(){
    
    });
    

    Instead of what you have.

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

Sidebar

Related Questions

I'm trying to pass some variables using jquery and ajax but for some reason
I'm trying to call a php function from jquery function to calculate some values
Im trying to get some values from the below xml feed <?xml version=1.0 ?>
Im trying to add some values up but some of the values have a
I'm trying to pass some POST variables from hidden inputs (using JQuery to change
I'm trying to get some aggregate values from different tables, but my problem is
I'm trying to get the total of calc.transport Table 3_product_folder contains duplicate values (column
Total noob here with javascript. I'm trying to alter a function. This is the
I'm trying to get some values off a DB and then putting those values
I'm trying to find near duplicate values in a set of fields in order

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.