Math.round vs toFixed(2)?
- Asked By: MoneyTactics
- Category: Mortgage Interest Calculator
I’m trying to get the below ShowVal()
case study to return a value to
2 decimals. Where/how would I use
toFixed(2) instead of Math.round?
[CODE]
function ShowVal() {
var I=eval(document.
mortgage_calculator.
interest_rate.value);
var N=eval(document.
mortgage_calculator.
total_num_months.value);
var S=eval(document.
mortgage_calculator.
loan_amount.value);
Document.mortgage_
calculator.monthly
_pymt.value=Math.
round(Monthly(I,N,S)
*100)/100;
document.mortgage
_calculator.total
_pymts.value=Math
.round
(document.mortgage_
calculator
.monthly_pymt.value*N
*100)/100;
}
[/CODE]
Cheers!
Incoming search terms:
KaptKos
Posted 3 months ago
Try something like this:
Document.mortgage_calculator.
monthly_pymt.value.toFixed(Monthly(I,N,S), 2)
Other Questions
- Can I itemize my mortgage interest paid in my taxes?
- Do mortgage lenders pull credit reports multiple times during the refinance process?
- how do they calculate the mortgage payment with interest?
- How long after a foreclosure is there an auction?
- If mortgage tax & interest forms are only in my name but multiple owners can they file my forms under thir nam?
I’m trying to get the below ShowVal()
case study to return a value to
2 decimals. Where/how would I use
toFixed(2) instead of Math.round?
[CODE]
function ShowVal() {
var I=eval(document.
mortgage_calculator.
interest_rate.value);
var N=eval(document.
mortgage_calculator.
total_num_months.value);
var S=eval(document.
mortgage_calculator.
loan_amount.value);
Document.mortgage_
calculator.monthly
_pymt.value=Math.
round(Monthly(I,N,S)
*100)/100;
document.mortgage
_calculator.total
_pymts.value=Math
.round
(document.mortgage_
calculator
.monthly_pymt.value*N
*100)/100;
}
[/CODE]
Cheers!
Incoming search terms:
KaptKos
Posted 3 months ago
Try something like this:
Document.mortgage_calculator.
monthly_pymt.value.toFixed(Monthly(I,N,S), 2)
Other Questions
- Can I itemize my mortgage interest paid in my taxes?
- Do mortgage lenders pull credit reports multiple times during the refinance process?
- how do they calculate the mortgage payment with interest?
- How long after a foreclosure is there an auction?
- If mortgage tax & interest forms are only in my name but multiple owners can they file my forms under thir nam?
Categories
Recent Search Terms
- can you deduct mortgage interest from rental property income as an expense
- 349000 mortgage
- low fico score va home loans
- what does refinancing a car mean
- is it dumb to keep on double paying mortgage payment
- how long do you have to own your house before you can refinance
- get mortgage credit score 660
- how much intrest can i expect with a 660 credit score
- mortgage interest deduction phase out calculator
- old vs new road bike


Toadaly
Posted 3 months ago
calculator.monthly_pymt.value=
Monthly(I,N,S).toFixed(2);