| free hosting image hosting hosting reseller online album e-shop famous people | ||
![]() ![]() |
||
Now paste this in the body section:
The pay box is set to read-only, to prevent any attempt at user input.loan for the loan amount
months for the number of months
rate for the interest rate
pay for the final result
if ((document.calc.loan.value == nullIf not, an Incomplete data message appears in the result box.
|| document.calc.loan.value.length == 0)
|| (document.calc.months.value == null
|| document.calc.months.value.length == 0)
|| (document.calc.rate.value == null
|| document.calc.rate.value.length == 0))
{ document.calc.pay.value = "Incomplete data";
var princ = document.calc.loan.value;Note : the rate value is divided by 1200 to convert to a monthly interest value.
var term = document.calc.months.value;
var intr = document.calc.rate.value / 1200;
var currency = formatCurrency(princ * intr / (1 - (Math.pow(1/(1 + intr), term))));
document.calc.pay.value = currency;