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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:27:39+00:00 2026-06-06T03:27:39+00:00

I have a jquery code which enables a user to select amount of money

  • 0

I have a jquery code which enables a user to select amount of money they wish to borrow and how long they would like to pay it back.

What I need to do is display the results in grid like table so that if a user wants to borrow $200 for 30days, they can pay 200/30 =$6.66 per day, so the grid would have day 1: 6.66, day 2: 6.66, day 3: 6.66 …… up to day 30.

I have tried using iteration

created a variable called days

for( var i=i; i<days; i++) {
    //display days and amount
}

Any help?

Why display the amount everyday if it is the same amount?
Because there is a slider somewhere in the code and the user can vary the amount and dates to see what their repayments would be on daily basis, it is part of a larger code

  • 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-06T03:27:41+00:00Added an answer on June 6, 2026 at 3:27 am

    Here is something to start with, just expand from here:

    HTML:

    Borrow Amount: <input type="text" id="borrow_amt" value="" />
    <input type="button" id="update" value="Update Repayment" />
    
    <p>&nbsp;</p>
    
    <table border="1">
    <tr><td colspan="30" align="center"> REPAYMENT SCHEME </td></tr>
    <tr id="days"></tr>
    <tr id="repayment"></tr>
    </table>​
    

    CSS:

    .td_days { padding: 10px; }
    

    JS:

    $(document).ready(function() {
    
        $('#update').click(function() {
    
            $('tr#days').html("");
            $('tr#repayment').html("");
    
            var days = 30;
            for (i=1; i <= days; i++) {
                $('tr#days').append('<td class="td_days">'+ i +'</td>');
            }
    
            for (i=1; i <= days; i++) {
                $('tr#repayment').append('<td class="td_days">'+ $('#borrow_amt').val()/30 +'</td>');
            }
        });
    
    });
    

    ​

    Part of the code c/0 @Alex Ball’s suggestion, so give him a credit.

    See code in action here: http://jsfiddle.net/DHYHx/

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

Sidebar

Related Questions

I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
I have the following JQuery code which does similar functionality like Stackoverflow where the
i have this jquery code which poplautes a input selector, which should display like
I have some code in jquery which looks like this: $(#filterZaal).attr(disabled, disabled); $(#filterGenre).attr(disabled, disabled);
I have jquery validation code which is working fine in ff but the same
I have some jquery code which I am trying to translate to YUI. I
On my main page I have this jquery code which does an ajax call
I have the following jquery code which doesn't work quite right when trying to
I have the following jQuery code which runs when I'm clicking an option in
I have a very simple JavaScript/jquery code which won't just work correctly. The problem

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.