I have two functions within the script, one for the Clock In time, and the second for when you clock out, which also computes the total time. I haven’t yet added in the actual calculation for finding the total time, that is not the issue. No code will run in the second function after the line var hoursTwo = currentTime.getHours();
Any help would be appreciated.
You are trying to call an undeclared var
is supposed to call
and so on for each function. If you want to access
currentTimeyou should declare it outside a function.Just FYI, using developer tools or firebug can reveal a lot in console. This reported the error in plain english.