% // Set databaseConnection = getDatabaseConnection() errorMessage = "" salary = "" hourly = "" dollarsPerSecond = "" calculatedFromSalary = True If Request.Form("command") = "Calculate" Then // get salary or hourly rate entered salary = Trim(Request.Form("salary")) hourly = Trim(Request.Form("hourly")) // validate for something entered, must be numeric errorMessage = ternaryOperator((salary = "" And hourly = ""), errorMessage & "Please enter either a yearly salary or hourly rate.", errorMessage) If errorMessage = "" Then // try salary first If IsNumeric(salary) Then secondsPerWorkYear = 7488000 dollarsPerSecond = CDbl(salary)/CDbl(secondsPerWorkYear) calculatedFromSalary = True Else errorMessage= "Please enter a numeric value." calculatedFromSalary = False End If // then try hourly If dollarsPerSecond = "" Then If IsNumeric(hourly) Then secondsPerWorkHour = 3600 dollarsPerSecond = CDbl(hourly)/CDbl(secondsPerWorkHour) calculatedFromSalary = False errorMessage = "" Else errorMessage= "Please enter a numeric value." End If End If End If End If %>
The Salary Odometer: Watch the Money Roll In!Brought to you by
|
|||||||||||||
What is A great para about nf. The Salary Odometer: Watch the Money Roll In! |
![]() ![]() |