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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:28:09+00:00 2026-05-28T02:28:09+00:00

I am running the following code: The first two little functions work because I

  • 0

I am running the following code: The first two little functions work because I am using the jquery calculate plugin… the last 3 fail in Firefox and Safari but work in Chrome

<script type="text/javascript">
$(document).ready(function() {      
    $("input[id^='balance']").sum("keyup", "#totalbalance");
    $("input[id^='payment']").sum("keyup", "#totalpayment");

    $('input.ltv1, input.ltv2').click(function() {
        var ltv1 = parseFloat($('.ltv1').val()||"0");
        var ltv2 = parseFloat($('.ltv2').val()||"0");
        result = ltv2/ltv1;
        total = parseInt(result);
        $('.ltv').text(total);
    }); 

    $('input.bal1, input.bal2, input.bal3, input.ltv2').change(function() {
        var bal1 = parseFloat($('.bal1').val() || "0");
        var bal2 = parseFloat($('.bal2').val() || "0");
        var bal3 = parseFloat($('.bal3').val() || "0");
        var bal = bal1 + bal2 + bal3
        var hv = parseFloat($('.ltv2').val() || "0");
        result = bal / hv;
        total = parseInt(result);
    $('.clv').text(total);
    });

    $('input.bal1, input.bal2, input.bal3, input.income').change(function() {
        var bal1 = parseFloat($('.bal1').val() || "0");
        var bal2 = parseFloat($('.bal2').val() || "0");
        var bal3 = parseFloat($('.bal3').val() || "0");
        var bal = bal1 + bal2 + bal3
        var income = parseFloat($('.income').val() || "0");
        result = bal / income;
        total = parseInt(result);
        $('.dti').text(total);
    });

});

</script>

I am not the best at javascript so I have pieced this together…

Anyway the site is http://settlementprep.com/pre-qual/homeowner/ and the little boxes show the different calculations: Loan to Value and Combined Loan to Mortgage don’t work..

Anyone have a clue?

thanks

  • 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-28T02:28:10+00:00Added an answer on May 28, 2026 at 2:28 am

    In your javascript, I see this:

    $('.ltv').text(total);
    

    But, in your page, I don’t see any object with a class="ltv". I see this HTML:

    <p id="ltv"></p>
    

    which would imply your javascript code should be this instead:

    $('#ltv').text(total);
    

    The same appears to be true for .clv. Code and HTML don’t match.

    FYI, I also see undeclared global variables like result and total. These should be local variables (with var in front of their first use to make them local variables).

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

Sidebar

Related Questions

When running the following code I get no output but I cannot work out
Running the following code, I get a StackOverflowError at the getPackage() line. How can
When running the following code it leaves out one row. When I do a
I am running following PHP code to interact with a MS Access database. $odbc_con
I am currently running the following code based on Chapter 12.5 of the Python
I'm running the following code to get a random entry from a dictionary: SELECT
I'm running the following code to update the database according to the data I
I am running the following code in tableView:cellForRowAtIndexPath: File *file = [[File alloc] init];
I'm running the following code on a list of strings to return a list
I had no problem at all running the following code on a local server,

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.