<script language="VBScript">
<!--
sub calculate_OnClick()
Dim MonthlyPayment
Dim MPR
If mp.cost.value="" or mp.cost.value=0 then
MsgBox "You must enter a value for the cost of the car"
Exit Sub
End If
If mp.months.value="" or mp.months.value=0 then
MsgBox "You must enter a value for the Number of Months"
Exit Sub
End If
If mp.interest.value="" or mp.interest.value=0 then
MsgBox "You must enter a value for the Interest Rate"
Exit Sub
End If
MPR=(1+(mp.interest.value/100))^(1/12)
MonthlyPayment=((mp.cost.value)/(mp.months.value))*MPR
MonthlyPayment=MonthlyPayment*100
MonthlyPayment=MonthlyPayment\1
MonthlyPayment=MonthlyPayment/100
mp.payment.value=MonthlyPayment
End Sub
-->
</script>
-- do not copy these two lines..
-- copy down from here for the form
<center>
<b>Mortgage/Monthly<br>
Payment Calculator</b></center>
<hr>
<form name="mp">
<b>Cost:</b> <br>
<input name="cost"><br>
<b>No. of Months:</b><br>
<input name="months"><br>
<b>Interest Rate:</b><br>
<input name="interest"><br>
<br>
<center>
<input type="button" Name="calculate" value="Calculate">
<input type="reset" value="reset">
</form>
</center>
<b>Monthly Payment is<br>
$</b><input name="payment">
|
Mortgage/Monthly
Payment Calculator
Must fill all the 3 fields
|