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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:35:23+00:00 2026-05-22T03:35:23+00:00

What will be the Javascript or JQuery code for following scenario ? A ABA

  • 0

What will be the Javascript or JQuery code for following scenario ?

“A ABA TextBox=Mandatory field”.

Must be numeric and 9 digits. Perform MOD 10 algorithm

  1. Multiply each digit of the first 8 digits of the ABA/Routing number with the following numbers respectively.
    a. 3,7,1,3,7,1,3,7
  2. Add the results of the 8 multiplications.
  3. Subtract the sum from the next highest multiple of 10.
  4. The result of the above step 3 must be equal to the 9th digit of the ABA/Routing number. If not display error in Message section

I have 9 different textboxes for each digit of ABA number . First I have to check if the entered number is numeric or not then I have to add this valid number in a String Array onwhich finally i will be adding my ABA Number validation .

I am absolutely stuck . Dont know how to solve this thing . I have found few codes but which doesnt qualify my need

EDIT :This is my HTML Code OnKeyUp Event I am adding value of perticular textbox in a string Array and OnKeyPress I am checking if the entered number is numeric or not

    <div style="padding-bottom: 5px; padding-left: 200px;padding-right: 20px;padding-top: 0;vertical-align: middle; width: 500px;">
  <input type="text" maxlength="1" size="10px" style="width:15px" id="ab1" onkeypress ="return onlyNumbers();" onkeyup ="return addABNumbers();"  /> 
  <input type="text" maxlength="1" size="10px" style="width:15px" id="ab2" onkeypress ="return onlyNumbers();" onkeyup ="return addABNumbers();" />
  <input type="text" maxlength="1" size="10px" style="width:15px" id="ab3" onkeypress ="return onlyNumbers();" onkeyup ="return addABNumbers();" /> 
  <input type="text" maxlength="1" size="10px" style="width:15px" id="ab4" onkeypress ="return onlyNumbers();" onkeyup ="return addABNumbers();" /> 
  <input type="text" maxlength="1" size="10px" style="width:15px" id="ab5" onkeypress ="return onlyNumbers();" onkeyup ="return addABNumbers();"  />
  <input type="text" maxlength="1" size="10px" style="width:15px" id="ab6" onkeypress ="return onlyNumbers();" onkeyup ="return addABNumbers();" />
  <input type="text" maxlength="1"  size="10px" style="width:15px" id="ab7" onkeypress ="return onlyNumbers();" onkeyup ="return addABNumbers();" /> 
  <input type="text" maxlength="1" size="10px" style="width:15px" id="ab8" onkeypress ="return onlyNumbers();" onkeyup ="return addABNumbers();" /> 
  <input type="text" maxlength="1" size="10px" style="width:15px" id="ab9" onkeypress ="return onlyNumbers();" onkeyup ="return addABNumbers();" /> 
  <input type="hidden" id="finalABNumber" value=""  onkeyup="return onlyNumbers();" />
  </div>

  <script language="javascript" type="text/javascript">
    function addABNumbers() {
        var finalabNumber = document.getElementById("ab1").value + document.getElementById("ab2").value +
                                                     document.getElementById("ab3").value +
                                                     document.getElementById("ab4").value +
                                                     document.getElementById("ab5").value +
                                                    document.getElementById("ab6").value +
                                                    document.getElementById("ab7").value +
                                                    document.getElementById("ab8").value +
                                                    document.getElementById("ab9").value;

        alert(finalabNumber);
        document.getElementById('finalABNumber').value = finalabNumber;
    } function onlyNumbers() {
      //  debugger;
        var chek=true;
        //var finalNumber = document.getElementById('finalAcntNumber').value;
        //document.getElementById("finalAcntNumber").value =
        var finalNumber =
                                                     document.getElementById("ac1").value +
                                                     document.getElementById("ac2").value +
                                                     document.getElementById("ac3").value +
                                                     document.getElementById("ac4").value +
                                                     document.getElementById("ac5").value +
                                                    document.getElementById("ac6").value +
                                                    document.getElementById("ac7").value +
                                                    document.getElementById("ac8").value +
                                                    document.getElementById("ac9").value +
                                                    document.getElementById("ac10").value +
                                                    document.getElementById("ac11").value +
                                                    document.getElementById("ac12").value +
                                                    document.getElementById("ac13").value +
                                                    document.getElementById("ac14").value +
                                                    document.getElementById("ac15").value+
                                                    document.getElementById("ac16").value;
       // debugger;            
        var test = document.getElementById("ac1").value;

       // chek = IsNumeric(document.getElementById("ac1").value);
       //            alert(chek);
       //            if (finalNumber.length < 15 )
       //            if(chek=false)
       //                alert('not a valid');
       //            alert(finalNumber);
        var e = event || evt; // for trans-browser compatibility
        var charCode = e.which || e.keyCode;

        if (charCode > 31 && (charCode < 48 || charCode > 57)) {
            return false;
        }
        else if (isNaN(document.getElementById('finalAcntNumber').value)) {
            alert('not a valid');
        }
        else {
           // debugger;
        //                if (test != "") {
        //                    alert(finalNumber);
                document.getElementById("Text1").value = finalNumber;
          //  }
            return true;
        }
       //   if (!isNaN(document.getElementById("finalAcntNumber").value))


      }
    </script>
  • 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-05-22T03:35:24+00:00Added an answer on May 22, 2026 at 3:35 am

    I figured out the answer on my own and the correct answer as per my requirement is as follows

    <script>
    function validation {
        var input = $("#someTextBox").val();
    
        if (!isNaN(input)) {
            var values = {
                input.charAt(0) * 3,
                input.charAt(1) * 7,
                input.charAt(2) * 1,
                input.charAt(3) * 3,
                input.charAt(4) * 7,
                input.charAt(5) * 1,
                input.charAt(6) * 3,
                input.charAt(7) * 7,
            }
    
            var sum = 0;
    
            for (int i = 0; i < values.length; i ++) {
                sum += values[i];
            }        
    
           var modTen = parseInt(sum / 10);
                        var result = (modTen + 1) * 10;
    
                        var finalResult = result - sum;
                        if (finalResult == (input.charAt(8)))
                            alert("Valid ABA Number.");
                        else
                            alert("Error");
    
    }    
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I have the following code: Javascript/jQuery: $(document).ready(function() { $(.clickMe).click(function() { $(.textBox).toggle(); }); });
The following jQuery Javascript code is included on an otherwise empty page. var element;
With the following code: <html> <head> <script type=text/javascript src=jquery-1.7.js></script> <script language=JavaScript> $(document).ready(function(){ $('#cssdropdown li.headlink').hover(
When I put the following code on my page. <script type=text/javascript src=../../Scripts/jquery-1.4.1.js /> Then
Consider the following html snippet <!DOCTYPE html> <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.4.2.js ></script> <script
I have the following JavaScript (and jQuery) code: function checkEmail(email) { if (email.length) {
I am using the following JQuery\JavaScript code to communicate with a WCF 4 REST
My following code will only alert once from Firebug, using jQuery's append. I was
i have the following jquery code. basically i will have several overlapped divs and
Have a look at the following code (additionally, you will need jquery.js , jquery.viewport.js

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.