Struggling just a big here. So I made a javascript codepage for clock in/out, but when I am trying to pass certain parameters in the clock in section of the code it will only let me pass them as a te...
From reviewing it in a text editor, it looks like you've got a scoping issue where the else {} condition that you're utilizing rid and its causing an issue where rid isn't set and so I'm guessing you're getting an 'rid is not defined' error. I've copied how I see it below with it condensed a little:
In the above, you're setting the value of rid at line 44 in the elseif condition after the response of your query and you're checking to see if the # of records is = 1. In this case, rid is contained within the scope of that IF statement from lines 43 - 59.
In the event that you don't have any records returning from your query - your code will jump down to line 60 into the else {} condition which has a different scope from lines 60 to 92 - but inside of that scope you're not setting rid anywhere. Basically since you're not processing the else if condition - then rid is never getting set anywhere and so its not being defined.
In order to fix it you will need to either remove rid from your addrecord call or define it some other way within the else {} scope so that it can be used.