$w.onReady(function () { // Initialize slider values and event listeners updateLoanAmountText(); updateInterestRateText(); updateLoanTermText(); $w("#loanAmountSlider").onChange(() => { updateLoanAmountText(); }); $w("#interestRateSlider").onChange(() => { updateInterestRateText(); }); $w("#loanTermSlider").onChange(() => { updateLoanTermText(); }); $w("#calculateButton").onClick(() => { calculateMonthlyPayment(); }); }); function updateLoanAmountText() { const loanAmount = $w("#loanAmountSlider").value; $w("#loanAmountText").text = `$${loanAmount.toLocaleString()}`; } function updateInterestRateText() { const interestRate = $w("#interestRateSlider").value; $w("#interestRateText").text = `${interestRate.toFixed(2)}%`; } function updateLoanTermText() { const loanTerm = $w("#loanTermSlider").value; $w("#loanTermText").text = `${loanTerm} years`; } function calculateMonthlyPayment() { const loanAmount = $w("#loanAmountSlider").value; const annualInterestRate = $w("#interestRateSlider").value; const loanTermYears = $w("#loanTermSlider").value; const monthlyInterestRate = (annualInterestRate / 100) / 12; const numberOfPayments = loanTermYears * 12; // Mortgage calculation formula const monthlyPayment = (loanAmount * monthlyInterestRate) / (1 - Math.pow(1 + monthlyInterestRate, -numberOfPayments)); $w("#monthlyPaymentText").text = `Monthly Payment: $${monthlyPayment.toFixed(2)}`; }
top of page

Property Listings

Kelvey House

For Sale

£1,250,000

Kelvey House

Bed

4

Bath

Floors

4

2

Size

2704

OX13

Coming Soon

£ To Be Revealed

OX13

Bed

3

Bath

Floors

3

2

Size

TBC

The Nest

For Sale

£1,250,000

The Nest

Bed

4

Bath

Floors

2

2

Size

1,999

bottom of page