Reputation: 1001
I have an ASP.NET Ajax Timer which I can stop or start using the following jQuery/Javascript:
var timer = $("[id$=Timer1]");
timer[0].control._stopTimer();
...
timer[0].control._startTimer();
How can I get the timer's current started/stopped status? The requirement is via Javascript/jQuery not code behind (VB/C#).
I read this thread where it mentions the "enable" property, but I understand that "stopping/starting" is distinct than "enabling/disabling" for a timer object.
Upvotes: 1
Views: 758
Reputation: 1001
I found the way so I'll post the answer to be helpful to others. Get the "_timer" attribute:
var status = timer[0].control._timer;
alert(status);
When timer is on its "_start" status it will return an integer. When timer is on its "_stop" status it will return 'null'.
Upvotes: 1