1stly, Happy New Year all
I have a form which have currency fields, so I need to accept commas and decimal points.
I'm trying to do a calculation with the fields and I am having problems.
The calculation is as follows.....
Loan Amount = 50,000.00
Property Value = 100,000.00
So I want to calculate the LTV (Loan to Value)
However although I'm using parseFloat, it seems to stop at the comma.
So I type 50,000.00 into loan amount , as I type into property value, all i enter is 100 but it is showing 50% in the LTV field.
Thus it must only be seing 50 in the loan amount not 50 thousand!
is there a built in function to take a standard currency field and parse it as a number then convert back to currency or do I have to start messing about with regex's ?
thanks,
1DMF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
I have a form which have currency fields, so I need to accept commas and decimal points.
I'm trying to do a calculation with the fields and I am having problems.
The calculation is as follows.....
Loan Amount = 50,000.00
Property Value = 100,000.00
So I want to calculate the LTV (Loan to Value)
However although I'm using parseFloat, it seems to stop at the comma.
So I type 50,000.00 into loan amount , as I type into property value, all i enter is 100 but it is showing 50% in the LTV field.
Thus it must only be seing 50 in the loan amount not 50 thousand!
is there a built in function to take a standard currency field and parse it as a number then convert back to currency or do I have to start messing about with regex's ?
thanks,
1DMF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.