i need to perform a calculation on two form values to submit the result.
The code I'm working with is:
<cfset rate1 = #form.NewSalary#*2080>
<cfset rate2 = #form.OldSalary#*2080>
<cfset PercentRateChange = rate1/rate2>
<cfoutput>#form.NewSalary#</cfoutput>
<br>
<cfoutput>#form.OldSalary#</cfoutput>
<br>
<cfoutput>#PercentRateChange#</cfoutput>
This is in my results page. What I'm having the problem with is teh #PercentRateChange# is calculating ok but not at the right percent level. When I divide 60000.00 by 20000.00 I get 3 as the percent level and it should be 30.
Is there a simple solution to this?
Thanks Hope this helped!
The code I'm working with is:
<cfset rate1 = #form.NewSalary#*2080>
<cfset rate2 = #form.OldSalary#*2080>
<cfset PercentRateChange = rate1/rate2>
<cfoutput>#form.NewSalary#</cfoutput>
<br>
<cfoutput>#form.OldSalary#</cfoutput>
<br>
<cfoutput>#PercentRateChange#</cfoutput>
This is in my results page. What I'm having the problem with is teh #PercentRateChange# is calculating ok but not at the right percent level. When I divide 60000.00 by 20000.00 I get 3 as the percent level and it should be 30.
Is there a simple solution to this?
Thanks Hope this helped!