Calculate Mortgage Payment
Feb 16, 2005
I'm trying to create a mortgage payment calculator in Javascript and am having problems. My algorithm seems correct but it's not giving the right results. Im using this code:
function do_calc_payment(){var term = document.calc_payment.term.value;var rate = document.calc_payment.rate.value;var amount = document.calc_payment.amount.value;var j = rate / (12*100);var m = term * 12;var payment = amount * ( j / (1 - (1 + j) ^ -m))var result = "$"+Math.round((payment)*1000)/1000;if(isNaN(payment)){document.calc_payment.rate.value="";document.calc_payment.amount.value="";result="Not a Number";}if(payment.length>=15){result="Max Characters";}document.getElementById('new_payment').innerHTML = result;}
View 2 Replies
ADVERTISEMENT
Nov 2, 2004
Does anybody know of an algorithm to calculate mortgage payments? e.g.
Amount: 100,000
Interest Rate: 4.5%
Term: 25 Years
Monthly Payments: x
I've looked at other js scripts to do this but it seems alot more involved then I thought, and because they use non descriptive variable names I can't work any of them out..
View 1 Replies
View Related
Jun 10, 2009
I would like for a "Pay Now" button to be disabled unless a checkbox is checked:
<form method="post" action="https://form.php">
<input src="https://image.gif" type="image" name="name_of_image">
</form>
View 6 Replies
View Related
Aug 16, 2010
I'm looking to make a payment form that calculates the prices as you go along, similar to this
i just dont know how to go about it, is there software that can be used?
View 3 Replies
View Related
Oct 3, 2011
i want the code below to display the total loan repayment amount instead of the monthly payment payment = principle * monthly interest/(1 - (1/(1+MonthlyInterest)*Months)) , eg if if l0an is 20$ payment is in 4 months, intrest rate is 15% display = amount to be repaid.
[Code]....
View 3 Replies
View Related
Nov 4, 2003
Where could I find a mortgage calculator script I could place on my website? I found a really cool one at www.dave.imarc.net/php free to use but I have a hard time understanding how to install it. I really don't even know what php is.
Could someone maybe guide me out of this programming lingo darkness?
View 2 Replies
View Related
Oct 12, 2010
I am trying to create a monthly mortgage calculator, I have been able to make it show prompts for Amount of loan; Interest rate; and Term of loan (in months), but it will not display the results. Below is the code I have utilized to get this far.
[Code]....
View 1 Replies
View Related
Oct 13, 2009
I've been trying to write a Javascript Mortgage Calculator for the past day and I believe I've got the structure right, although for some reason my functions must not be operating correctly or are not being called correctly. I'm almost afraid to say that it could be an error in the functions usage within the while loop. This Mortgage Calculator uses the principle of "bisection" to guess at the monthly payment necessary to fulfill the standards of the mortgage in question. This means that the loop is used to consistently halve the value of a guess until the correct monthly payment is guessed. Here is the code:
<script type=text/javascript>
function calcMortgage (amountText, yearsText, interestText) {
// constant definitions
// variable declaration
var amount = Number(amountText);
var years = Number(yearsText);
[Code]...
View 3 Replies
View Related
Oct 12, 2009
I have a mortgage calc that is adding an extra decimal place to my interest rate. To see this in action go to: [URL]
Change the interest rate to 7.5
Click Calculate Payment
Click Create Amortization Chart
On the following screen you'll see a recap of your data and the interest rate will now say 7.55. Same thing happens if you enter 6.2. Next screen shows 6.22/. I've attached the html and js files in a zip.
View 2 Replies
View Related
Sep 22, 2004
I want to add onto my ebay auction a calculation which would show the unit price of a box of 5 electrical sockets.
So say it is currently on auction at £5.62 and I charge £1.99 Postage & packing thats a total of £7.61 with a unit price of £1.52. Then £1.52 is the figure I want to output and show on screen.
View 2 Replies
View Related
Nov 20, 2002
I'm just starting out in JS and would like to know how to solve this.
I have an HTML form with 3 checkboxes, like a would-be order form. For example, on checkbox 1, the product is a toy car that costs $5.00, second box is a cigar cutter for $50, etc. I to have a button that when clicked, enters the total price (no taxes or subtotals) into a textbox field below in the same page.
View 3 Replies
View Related
Jun 29, 2006
I believe that this has been answered somewhere but I cannot find it. I have 51 textboxes on page. In 50 I can enter value. 51st should tell me what is average of entered numbers.
As user types I want script to iterate trough form count and sum non-empty fields and than divides this two numbers.I need to sum values from fields that have value (not emty fields) and to divide this number by number of non empty fields. This should occur on every change in any of those 50 textboxes so to have live preview of average.
I'm really new to JS and I don't know even how to sum these numbers.
View 5 Replies
View Related
Mar 6, 2010
I have some data thats in a number, lets say 5455
.
Id like to get the TAX from an input, say like 2.5 percent. code...
View 3 Replies
View Related
Jul 9, 2010
I want to calculate X and Y of a div, but I get an infinite loop, can you tell me please what's the problem with my code? code...
View 4 Replies
View Related
May 9, 2010
I built 2 steps script - in the first page the visitor choose the date he want to schedual his appoitment and his location:
PHP Code:
<select name='zone'>
<option value='-4' selected> USA - EST</option>
<option value='-7'>USA - PST</option>
[code]....
In the second page he need to choose the time he want for his appointment (the time is in GMT+3 -> my local time). in this page the script also get the time zone and the date that he choose in the previous page (using POST - PHP). the date saved in variable. I used unix time (MKTIME function) I want that every time my visitor choose time (from drop-down box) a new cell/DIV will appear with his local time.for example - when he choose date: 10 May 2010, time zone: Austrlia - East Coast (+8 Hours) and time 22:00, New DIV will appear with the date "11 May 2010, 03:00AM" (there are 5 hours different).what is the JS what caculate and show the visitor local time?(I have, in PHP, only his time zone and the date that he coose in the first page)
View 2 Replies
View Related
Apr 11, 2010
I have tried many time to make the calculation to appear at the total text box.
here is my coding..
<html>
<head>
<title>
PRESENTATION EVALUATION FORM
[Code]....
View 5 Replies
View Related
Apr 8, 2011
I'm working on creating a custom calculator to determine the amount of money / credits users may earn from referrals. I've tested onChange, and it will work only when I have changed to a new field or clicked off that field. How do I make this calculate live?
So if the current value is 5 and I change it to 6, it will automatically recalculate the new value.
You can see what I'm working on here:
[URL]
Note: The one I'm testing is the 1st Level field. For now i'm just having it display the date.
View 6 Replies
View Related
Feb 15, 2007
Can someone explain to me how I should code to calculate this?
I want to let the user add 4 different numbers (this is done) and then I want to + these numbers with each other.
This is the code I got: var medel = tal1+tal2+tal3+tal4 ;
Let say the user enters 1+2+3+4. Then the result should be 10. But I get this number as result: 1234
What have I done wrong?
View 2 Replies
View Related
Jul 26, 2011
I am making what I call a PM (Preventive Maintenance) Kit list. My users will use this list to generate a printable sheet to tell me what they used out of there kit. The list includes pricing per part and I would like the list to calculate the costing as they enter each item. So a total per line and an overall total cost.
I have included a snap shot of the page and below is the code. I can do this sort of thing on a small scale with just adding two lines but I am not sure how to modify it to handle this scale. You can see the script towards the bottom of the page. That is my lame attempt to make the per line costing happen but NOTHING happens.
<?php
require "../config/bpts_config.php";
// Start the session
//session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
[Code]...
View 4 Replies
View Related
Mar 31, 2009
This is my coding that I try but I still cannot get the function to calculate cgpa.
<script language="Javascript" type="text/javascript">
/*Gred*/
function DisplayGred (GredPair) {
var Gred = GredPair.split('|');
var jam_kredit = document.getElementById('jam_kredit').value; (user input pay amount student pay for course)
document.getElementById('pointer').value = Gred[1]; (display course fee when item is selected)
}
function CalculateCGPA () .....
This is the interface look alike, the code subject, subject name and credit hours are retrive from the database, so how to calculate it?
</p>
<form id="form1" name="form1" method="post" action="">
<table width="552" height="82" border="0" class="tborder">
<tr bgcolor="#006699" class="text2">
<td width="17" bgcolor="#000099"><div align="center" class="style3"><strong><font size="2">Bil</font></strong></div></td> .....
View 2 Replies
View Related
May 13, 2005
I want to have 1 option box with values 10 100 1000 10000 etc in it , then i want to be able to select eg 100 and underneath it will show 100x25 which would be 2,500 so i want 1 box that has values of ten , hundred , thousand etc and they multiply by 25 and show underneath .
View 3 Replies
View Related
Jul 19, 2011
I have 3 textbox controls on my web page that are numeric currency fields in which a user can enter a numeric value, either positive or negative into TB1 and TB2 (both of these fields go thru edit checks to make sure a numeric value is entered and then return a currency value ie; $2500.00). TB3 is calculated resulting in TB3 = TB1 (($6500)) - TB2 ($2500).
My problem is that if a user enters a negative value for TB1, it returns a "NaN" and the value in TB3 turns out to be the same value as in TB2. Essentialy the calulation ends up being 0 - 2500 = 2500 (see screenshot). I've attached 2 functions below.
Code:
function cal_Overage_Shortage() {
if (make2Number("TB_LowPoint") <= 0) {
document.getElementById("TB_OverageShortage").value = GetValueTextbox("TB_LowPoint") + GetValueTextbox("TB_RequestedLowPoint");
[Code]....
View 1 Replies
View Related
Apr 28, 2009
Using this formula for parts per million, can somebody please show a SIMPLE example of how to calculate all formulas for ppm?i tried everything..like in kilograms, etc...anyway, the link:[URL]
View 9 Replies
View Related
Jul 23, 2005
For my website i would like to display the age of my son in years,
months, days and hours.
For now i manage to get a result for totals. Like the total number of
days.
This is the beginning:
starttime = Date.parse("Aug 10,2003, 07:07")
sdt = new Date(starttime)
starttime= Math.ceil((starttime) / 1000 / 60 / 60 / 24 )
ndt = new Date()
y = sdt.getYear()
m = sdt.getMonth() + 1
d = sdt.getDate()
h = starttime
View 26 Replies
View Related
Oct 6, 2010
automatically calculate a total. The script pulls a price, which is given from a database to a hidden form field. Then once the quantity is changed the bottom form field automatically updates the price. Here's my script if someone could possibly point out why this might not be working (or is my logic flawed.)
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Shopping Cart</title>
<script type="text/javascript">
/* <![CDATA[ */
function calcTotal(){
[Code]...
View 3 Replies
View Related
Mar 24, 2009
i have a problem with the arrays.i have entered all the relevant arrays to calculate a list of cheap quotations but when clicking on the submit button it doesnt do nothing.when clicking on the submit button i want it to bring up the list of quotations based on the data entered in the form..
View 7 Replies
View Related