chronometer in col

Questionschronometer in col
C3media asked 5 years ago

Hello i have this code to start chronometer and works fine:

<script type="text/javascript">
var cronometro;
function detenerse()
function carga()
contador_s =0;
contador_m =0;
s = document.getElementById("segundos");
m = document.getElementById("minutos");
cronometro = setInterval(
m.innerHTML = contador_m;
s.innerHTML = contador_s;

<body onload="carga()">
<span id="minutos">0</span>:<span id="segundos">0</span>
<input type="button" onclick="detenerse()" value="Stop"/>

There is possible to call this function using method On_after_insert and on_after_update?

Thank you by your help!

1 Answers
Abu Ghufran answered 5 years ago


Your ticket somehow got delayed, apologies for that.
You cannot have JS code inside php callback functions.

You can have it using loadComplete event and it will run everytime grid reloads.
For usage ref: you can review demos/editing/custom-events.php

For element selection like:
s = document.getElementById("segundos");
m = document.getElementById("minutos");
You can inspect using firebug (f12) and replace element id.

Your Answer

3 + 16 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?