Mortgage Calc Adding Extra Decimal Place To Interest Rate

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


ADVERTISEMENT

JQuery :: Converter That Needs A Decimal Place Limiter?

Jul 1, 2011

I am building a simple converter, converting between mm's and inches and I need to round off the results to 2 and 3 decimal places respectively.The code can be seen below can anyone show me how to get my results with decimal places:

<head>
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)

[code]...

View 4 Replies View Related

Adding Extra Fields

Dec 27, 2004

I have a script that I am trying to get working in IE. It works great in Firefox, but will only work one time in IE.

The idea is that the user is presented with a field. As soon as the user types in the field the script adds a new field under it. To keep from adding more than one field there is a variable called probURLnumKeep that gets incremented only if the field being typed in is the last field created. Code:

View 2 Replies View Related

JQuery :: Adding An Extra List Item At The End?

Apr 18, 2011

So let's say I have a list

<ul>
<li>Item 1</li>
<li>Item 2</li>

[code]....

View 8 Replies View Related

Form Validation Query - Adding Extra Fields To A Form?

Sep 1, 2009

I have a working contact form with 3 of the fields requiring validation and they work well. I have added extra fields to the form (StatusClass, Project, CameFrom). These 3 fields return fine but I need to validated them. My problem is that the new fields don't show in the behaviours/validate panel even though they are within the form tag.

<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

[Code]...

View 9 Replies View Related

Calculate Interest Earned Code?

Feb 8, 2011

I'm a JavaScript newbie and need help with code.Given principle, yearly interest rate and time in years, I need to calculate interest earned and the ending amount in the account at the end of time.

Formulas:

I=P*R*T
S=P+T

This is what I have which didn't work:

<script type="text/javascript">
var P,R,T,I,S;
P=prompt("enter your Principle","");

[code]...

View 5 Replies View Related

Mortgage Calculator Script

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

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 View Related

Place A Text At Fixed Place On A Picture With Script?

Jan 19, 2011

Isn't it possible to place a text at a fixed place on a picture with javascript ?

The text will be AJAX updated...

View 5 Replies View Related

Getting A Program That Will Compare Loans With Various Interest Rates?

Nov 15, 2011

monthly payment = c*r*(1+r)^n /(1+r)^n

View 22 Replies View Related

Changing Calculation In Simple Interest Calculator

Aug 10, 2010

The exercise problem is to "MODIFY the code in the "calculate_click" event so interest is added to future value just once each year for the number of years that they were entered by the user". The calculation as you see it below assumes an amount is invested MONTHLY (not just once), and the interest is calculated accordingly. This is what I think the problem is trying to calculate: using a $100 one time investment at 10% interest (compounded once annually) for one year = $110 as the future value. For two years, the future value should equal $121 (110 + (110*.10)). Okay, if my math is wrong, let me know. This is what I'm trying to get it to match to.

I have been able to modify the calculate_click function to compound the interest annually (it does it monthly now). Cool. I cannot get it to stop adding $100 annually. See my math above? I think that's the answer. My manipulation of the code yields $110 for the first year, $231 for the second year, etc. The $231 is incorrect cuz it adds an extra $100. See, this is a simple interest calculator I can't figure out! The original code is below that calculates the investment as a monthly investment as opposed to one-time. To avoid confusion, I did not include any of my modifications. But yeah. I know that the major culprit is how the "for" loop is being executed. I've highlighted where I think the code needs to be changed, but I haven't changed it here. Note the first function is a shortcut to execute getElementbyID.

The Code:
var $ = function (id) {
return document.getElementById(id);
} var calculate_click = function () {
var investment = parseFloat( $("investment").value );
var annualRate = parseFloat( $("rate").value );
var years = parseInt( $("years").value );
$("futureValue").value = ""; .....

View 2 Replies View Related

Creating A Monthly Mortgage Calculator

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

Algorithm To Calculate Mortgage Payments..

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

Bank Website - Calculating Loan Repayment With Interest

Jun 10, 2010

I am having a few problems with my JS, and now that the module has finished, I find myself struggling still. I am going to post my JS and the HTML page its related to. The site is a mock up for an assignment - basically, its a pretend bank website where a person applies for a loan, and all my JS does is work out if the applicant does the following correctly:

Enters repayment years 1 to 25
Enters a loan amount of 1000 to 250000
Checks a box for loan protection
Calculate button
Reset Button
Then tells the user what it is going to cost them from interest to total amount to be paid.

Javascript:
function init(){
var baserate=4.25;
var amount=parseInt(document.getElementById("loan").value);// end bracket missing - done
var repaymentyears=parseInt(document.getElementById("repaymentyrs").value);// end bracket missing - done
var rate;
var interest;
var loanprotect=5;
var total;
var monthlyrepayment=repaymentyears*12; .....

View 4 Replies View Related

Calc() Issue Not Going Over 2??

Sep 5, 2005

I have a javascript calculator that when you update a users level you click calculate and it updates there skill needed to reach the next level my problem is it only calculates as high as the number 2:

echo "<script langauage="javascript">
function calc() {
a = document.battle.newlevel.value;
b = 150;
c = document.battle.newskillneed.value;
answer = eval(a*a*b);
if(c>answer) {
document.battle.newskillneed.value = answer;
}
max.innerHTML = answer;
}
</script>";

Example: Level 2*(150 * Level 2) = 600 works fine but
Level 3*(150 * Level 3) = nothing why won't it work any higher its like there is a cap on how high it will go...

Also if I enter level 1 it comes up with 150 but if i put in level2 and press calculate it won't do anything but if i start out at level2 it works and then i move down to level 1 it works why won't it work moving up in numbers??

View 1 Replies View Related

Functions Called Correctly In A Mortgage Calculator

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

Round Off This Calc To 2 Decimals?

Jan 3, 2010

First time user of Javascript and built an online calculator, trouble is I dont know where or how to code it so the answer ends with only 2 decimals

I have embedded code, Personally I think it's a miracle the darn thing works.:thumbsup: Link to page it's on [URL]...I have searched and read but after hours of trying stuff gave up.

<!--
function treevalue() {
document.volume.result.value=(((3.14159*((document.volume.radius.value)*(document.volume.radius.valu e)))*(document.volume.height.value))/3)*(document.volume.base.value)*(document.volume.e.value)*(document.volume.fv.value)*(document.volum e.l.value);

[Code]...

View 9 Replies View Related

Using Pull Downs And Calc Birthdate?

Apr 21, 2010

I am trying to use select options to get birthdate and calculate the age. I got the birthday with "birthDay = document.form1.selDate;" However i'm lost on the birthMonth and birthYear. I've looked at lots of examples. The birthMonth probably needs to be converted to integer, or use 1 thru 12 rather than Jan thru Dec. But birthYear i'd think would come back as a valid number. Is anyone familiar with this?

[Code]...

View 3 Replies View Related

Missing From Simple Calc() Function?

Nov 16, 2010

Don Gosselin's JavaScript Fourth Edition is a tiresome read and I have been unable to put together the necessary tools that Don teaches to find the answers that I want to make the following function work.

function calculate()
var shipping = 0;
var total = 0; {
if (document.forms[0].hand_tool.value != document.forms[0].hand_tool.value == true)
(document.forms[0]item1.value == 20); {

[Code]...

View 3 Replies View Related

Calc Subtotals And Total On Js/php Looped Form

Apr 14, 2005

I have an alteration to do on a multi-page form which was previous in use for single item selection and calculations only.

Now the form has to be altered to process multiple items. My difficulties lie in tackling the javascript calulations for a form that populates dynamically with as many items as the user has previously selects.

Item recordID's are POSTed to this form as an array. The array determines which item records are pulled from the database via sql. The form has, for each record, a textfield for item quantity and subtotal, and a hidden input that holds the item cost price.

Previously, this was calculated by targeting hard coded form field names, however the dynamic nature of this form requires dynamic targeting or a different field naming strategy all together so that the javascript function can iterate through the form fields and calculate subtotals and total on the fly.

Here's the code so far;

The previous calculation function for the single item form:-

function calcForm(){
qty = parseFloat(document.confirmTicketPurchase.ticketQty.value)
if (isNaN(qty)){
alert("You must enter a valid number into the Enter Quantity field")
return false
}
if(qty <=0 || qty % 1 != 0 ){
alert("You must enter a quantity of tickets between 1 and 999 only")
return false
}
costPer = parseFloat(document.confirmTicketPurchase.perticketCost.value)
total = costPer*qty
document.confirmTicketPurchase.ticketCost.value = total
return true
}
I have to edit this javascript function to work with the following form and edit the form field names to suit the function.

The new form :-

<form action="#" name="confirmTicketPurchase" id="confirmTicketPurchase" method="POST">
<table border="0" cellpadding="2" cellspacing="1" class="dataTable">
<tr class="trTopRow">
<td colspan="2">You Have Selected The Following Ticket/s</td>
</tr>
<?php do { ?>
<tr class="trOdd">
<td colspan="2"><strong><?php echo $row_rsTickPurchase['ticketName']; ?></strong></td>
</tr>
<tr class="trEven">
<td width="36%">Enter Quantity:</td>
<td width="64%" class="algn_R"><input name="ticketQty" type="text" id="ticketQty" value="1" size="4" maxlength="4" onkeyup="calcForm()" /></td>
</tr>
<tr class="trEven">
<td>SubTotal:</td>
<td class="algn_R">
<input name="perticketCost" type="hidden" id="perticketCost" value="<?php echo $row_rsTickPurchase['ticketCost1']; ?>" />
<input name="ticketName" type="hidden" id="ticketName" value="<?php echo $row_rsTickPurchase['ticketName']; ?>" />
<input name="ticketID" type="hidden" id="ticketID" value="<?php echo $row_rsTickPurchase['ticketID']; ?>" />
$ <input name="ticketCost" type="text" id="ticketCost" size="12" readonly="true" /></td>
</tr>
<?php } while ($row_rsTickPurchase = mysql_fetch_assoc($rsTickPurchase)); ?>
<tr class="trOdd">
<td>TOTAL:</td>
<td class="algn_R">$
<input name="total" type="text" id="total" size="12" /></td>
</tr>
<tr>
<td colspan="2">Confirm your selection and proceed to Step 6</td>
</tr>
<tr class="trbtn">
<td colspan="2"><input name="userEmail" type="hidden" id="userEmail" value="<?php echo $_SESSION['email']; ?>" />
<input name="step" type="hidden" id="step" value="6" />
<input name="Submit" type="submit" class="loginBtn" value="Confirm" /></td></tr>
</table>
</form>

The calc function is called onLoad and during user input with onkeyup. I'd really appreciate some tips as to how to tackle this one. Currently I'm working on how to get the field names for each form field unique via the php loop which populates the form.

View 2 Replies View Related

Place The Drop-down List In The Right Place?

Jul 23, 2009

I use a Time Date Picker Javascript code [URL]. It works fine with a placement problem. When you click one of the last pair input fields on the page, a drop-down list will appear from the input field. In my case, the drop-down list shows on the bottom of a page instead. I can't find the code controls the location of the list.

View 1 Replies View Related

Rate And Review It Script

Mar 29, 2001

I am looking for a script that would enable users to rate and review products (ie rate it from 1-10 and leave comments about the product). The script must run on a NT server and be free. I know such a script must exist, but I have searched various script archives with no success. I have been considering hacking out my own using a flat file database, but I don't really have the time and don't want to re-invent the wheel.

View 1 Replies View Related

Executing An .exe File On Client Side - Run An Pbrush Or Calc

Oct 12, 2011

I am trying to execute an .exe file on client side using javascript, say i want to run an pbrush or calc on client side click using JAVASCRIPT..

I tried this by embedding the following in source page of my web application(ASP.NET)

But i am getting an script error called Automation Server can't create an object

View 3 Replies View Related

FedEx Or UPS Rate Calculator Integration

Jul 20, 2005

I have to integrate FedEx or UPS's Rate Calculator with an eCommerce web site. I have a web site which offers some products for sale. The price of the products is being charged to customer. But now I want to calculate the amount of shipping depending on the postal code in USA and Canada only with FedEx or UPS and add to the total amount. I looked the tools offered by FedEx and UPS, but still I could not integrate with the web site. Even after following the documentation. I want to do like within one window or an pop-up window of browser, but the goal is depending on the postal
code the amount of shipping should be calculated and added to chargeable amount.

View 2 Replies View Related

Create And Check The Values Of The Product Rate?

Nov 21, 2009

I have checkboxes which are created dynamically depending on the number of records being returned. With each row of the product being displayed along side the check box there is also a value called 'product rate' which is being returned for every product. I have to ensure via javascript that the products which are checked are all of the same 'product rate'. how do i do this? Please help me this is very urgent! I have tried a lot of things but it is not working. I took a hidden value for the product rate which again gets populated everytime the check box is created but i didn';t understand how do i create and check the values of the product rate for the ones which are sele cted?

View 2 Replies View Related

Custom Refresh Rate To Perl Script

Jun 15, 2009

I am asked to use JavaScript as part of an intro course on Perl in one of the projects.There are two html frames. The lower frame contains two user forms, one for a set of fields (name, email, comments etc), and the other that I am trying to add so that I can set a refresh rate for the upper frame.When I submit the frame rate as a number, say 5, the upper frame reloads but does not refresh at the rate I indicate.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved