I want to use the following code:
//module2.js
(function(){
var dbid = "bnhipanch";
var dbidTable = "bnhiu5b67";
var apptoken = "km77t6cxnfntudtaandxcn3cu7d";
$.ajaxSetup({data: {apptoken: apptoken}});
var querystring=document.location.search;
if (/a=nwr/i.test(querystring)) {
var timeFormOpen = new Date().getTime();
$("#_fid_7").attr("readonly", true);
$("#_fid_8").on("click", function() {return false});
setInterval(function() {
var timeCurrent = new Date().getTime();
$("#_fid_7").val(parseInt((timeCurrent - timeFormOpen)/1000, 10) + " seconds");
}, 1000);
}
})();
but I need to show the timer on the button I am using and replace ">In since "&[Time-In]&" with the timer which will time from the "Time in" time.
Can you help me with this? Thanks
var text gray = "<a style=\" text-decoration: none; background: #c2c2c2; border-radius: 5px; color: #fff; display: inline-block; width: 150px; text-align: center; padding: 8px 20px; font: normal 700 14px/1 \"Calibri\", sans-serif; text-shadow: none; \">Checked Out</a>";
var text green = "<a style=\" text-decoration: none; background: #34a853; border-radius: 5px; color: #fff; display: inline-block; text-align: center; width: 150px; padding: 8px 20px; font: normal 700 14px/1 \"Calibri\", sans-serif; text-shadow: none; \">In since "&[Time-In]&"</a>";
If([Maximum Record ID# In]>[Maximum Record ID# Out],$green,$gray)