I would like to add a stopwatch to a "panel" on the app. Is there any coding for this and how/where should I paste it to get it on the panel?
I would like to add a stopwatch to a "panel" on the app. Is there any coding for this and how/where should I paste it to get it on the panel?
I found this coding from another topic, but I don't know where to place it and the member had a problem with it stopping if the phone went to "sleep" (energy conservation mode).
Coding: var sec = 0;
var min = 0;
var hour = 0;
function stopwatch() {
sec++;
if (sec == 60) {
sec = 0;
min = min + 1; }
else {
min = min; }
if (min == 60) {
min = 0;
hour += 1; }
if (sec, 1000);
}
Hi Christopher,
Here is what we found:
http://stackoverflow.com/questions/20...
Where would I put that coding?
Hi Christopher.
It's a diffrent places.
Main js functions should be placed in new JavaScript asset.
Running of certain functions like "start" and "stop" should be placed in the "click" event handers for certain buttons.
Regards.