JavaScript Scripts





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Free Java Script Codes
Javascript List All
Slide Show Slide Show
Ad Display Ad Display
Image Effect Image Effect
Animated Image Effects Animated Image Effects
Form Validation Form Validation
Color Picker Tool Color Picker Tool
Formatting Forms Formatting Forms
Select All Select All
Dynamic Form Select Dynamic Form select
Dynamic Color Dynamic Color
Calendar Script Calendar
Textbox Counter Textbox Counter
Alphanumeric Alphanumeric
Date Time Script Date & Time
Stop Watch Script Stop Watch script
Delete Repeated Values Delete Repeated Values
Pagination Pagination
Random Generator Random Generator
Animated Text Animated Text
Cursor Position Cursor Position
User Info Window / User Info
Security Security / Authenticate
Bookmark Bookmark
Mouse Effects Mouse Effects
Title Bar Title Bar
Status Bar Status Bar
Country List Country List
Free Games Free Games
Calculators Calculators
 




Simple Mortgage Loan Calculator Script


About
This free javasrcipt Mortgage Loan calculator is used to calculate Monthly Payment( EMI ),Monthly Average Interest and Monthly Interest based on Loan amount, rate of interest and number of years . This Loan calculator is for free.


Features
a) Javascript Simple Mortgage Loan Calculator provides Monthly Payment ( EMI ) and Monthly Interest for the given Loan amount ,interest rate and period.
b) This is a free javascript calculator.
c) Just copy the code into your page and use it.

Preview

Simple Mortgage Loan Calculator
Loan Amount:
Interest Rates:
Term(Years):

H

Results:
Monthly Payment(EMI):
Monthly Average Interest:
Monthly Interest:


Code
Javascript
<!-- Script by hscripts.com -->
<style type="text/css"> .subheading{ font-size:13px; font-family: arial, verdana, san-serif; color: black;} </style> <script type="text/javascript"> function checnum(as) { var dd = as.value; if(isNaN(dd)) { dd = dd.substring(0,(dd.length-1)); as.value = dd; } } function loan() { var a = document.first.aa.value; var b = document.first.bb.value; var c = document.first.cc.value; var n = c * 12; var r = b/(12*100); var p = (a * r *Math.pow((1+r),n))/(Math.pow((1+r),n)-1); var prin = Math.round(p*100)/100; document.first.r1.value = prin; var mon = Math.round(((n * prin) - a)*100)/100; document.first.r2.value = mon; var tot = Math.round((mon/n)*100)/100; document.first.r3.value = tot; for(var i=0;i<n;i++) { var z = a * r * 1; var q = Math.round(z*100)/100; var t = p - z; var w = Math.round(t*100)/100; var e = a-t; var l = Math.round(e*100)/100; a=e; } } </script>
<!-- Script by hscripts.com -->


HTML Code
<table width=90% border=0 cellpadding=0 cellspacing=0 >
	<tr><td align=center >
		<form name=first>
		<table class=subheading cellspacing=0 cellpadding=3>
			<tr><td>Loan Amount:</td><td><input name=aa type=text size=15 onkeyup=checnum(this) ></td></tr>
			<tr><td>Interest Rates:</td><td><input name=bb type=text size=15 onkeyup=checnum(this) ></td></tr>
			<tr><td>Term(Years):</td><td><input name=cc type=text size=15 onkeyup=checnum(this)></td></tr>
		</table>
		<br><input type=button name=ss value=calculate onclick=loan() class=calc>
	<br>
		<table class=subheading cellspacing=0 cellpadding=3>
			<tr align=center><td class=inner colspan=2><b>Results:</b></td></tr>
			<tr><td>Monthly Payment(EMI):</td><td> <input name=r1 type=text readonly > </td></tr>
			<tr><td>Monthly Average Interest:</td><td> <input name=r2 type=text readonly ></td></tr>
			<tr><td>Monthly Interest:</td><td> <input name=r3 type=text readonly > </td></tr>
			</td></tr>
		</table></form>
	</td></tr>
	<tr><td align=right>&copy<a href="http://www.hscripts.com" style="font-size:13px;color:#3D366F;text-decoration:none;cursor:pointer;"> hscripts.com</a>
	</td></tr>
</table>

Release Date - 07-03-2008
Get free version without ©copyright link for just 5 price

For customization of this script or any script development, contact us at support@hscripts.com


Usage
Here we have explained with a form
a) Creating the form
<form name=first>
    Loan Amount:<input name=aa type=text onkeyup=checnum(this) >
    Interest Rates:<input name=bb type=text onkeyup=checnum(this) >
    Term(Years):<input name=cc type=text onkeyup=checnum(this)>
    <input type=button name=ss value=calculate onclick=loan() >
    Monthly Payment(EMI): <input name=r1 type=text readonly >
    Monthly Average Interest:<input name=r2 type=text readonly >
    Monthly Interest:<input name=r3 type=text readonly >
</form>
b) Include the Javascript code into your <head> tag.
c) Enter the value for loan amount, rate of interest and number of years. After entering the values click calculate button
d) When calculate button is clicked then function loan() is triggered to calculate the monthly payment( EMI ), monthly average interest and monthly interest for the given loan amount, rate of interest and period.



License
- The javascript (misspelled as java script) is given under GPL License
- i.e. Free use for those who use the codes as it is.
- Free, if your modification does not remove our copyright information and links.
- Click Here for detailed license information.
- You can purchase the script if your requirements does not meet our GPL License terms.
Other Links

web hosting