hello...i am using one countdown timer in my online quiz....when user starts quiz i have to take to take tatabseime difference between start time and end time and that time difference i have to stored in minute and second format(i.e 1.30) in database....
problem is that i am not able to convert in that format...i am capturing time in seconds...help me
sending my code--
var mins
var secs;
function cd() {
mins = 1 * m("15"); // change minutes here
secs = 0 + s(":01"); // change seconds here (always add an additional second to your total)
redo();
}
function m(obj) {
for(var i = 0; i < obj.length; i++) {
if(obj.substring(i, i + 1) == ":")
break;
}
return(obj.substring(0, i));
}
function s(obj) {
for(var i = 0; i < obj.length; i++) {
if(obj.substring(i, i + 1) == ":")
break;
}
return(obj.substring(i + 1, obj.length));
}
hello...i am using one countdown timer in my online quiz....when user starts quiz i have to take to take tatabseime difference between start time and end time and that time difference i have to stored in minute and second format(i.e 1.30) in database.... problem is that i am not able to convert in that format...i am capturing time in seconds...help me
sending my code--
var mins var secs;
function cd() { mins = 1 * m("15"); // change minutes here secs = 0 + s(":01"); // change seconds here (always add an additional second to your total) redo(); }
function m(obj) { for(var i = 0; i < obj.length; i++) { if(obj.substring(i, i + 1) == ":") break; } return(obj.substring(0, i)); }
function s(obj) { for(var i = 0; i < obj.length; i++) { if(obj.substring(i, i + 1) == ":") break; } return(obj.substring(i + 1, obj.length)); }
function dis(mins,secs) { var disp; if(mins