Forum Discussion
JavaScript CountDown Timer Not Working in a Browser
Thank you both so much. I will try out these solutions and report back.
Thanks again to both of you. All solutions work as intended. However, it works in a browser only if I publish only the scene in which the clocks are used. When I publish the entire project, the time shows as all zeros. I am going back through the project slide by slide to see if there is some random code somewhere causing problems.
- Nedim22 days agoCommunity Member
Attached is the same version from my previous post, but expanded to include multiple scenes. I tested it in all major browsers except Safari and did not encounter any issues.
All timers start at 5 seconds and count down correctly, displaying the message once 0 is reached. If you navigate away from a slide while the timer is still running and then return, a new session starts from 5 and counts down again. Resuming the course or switching between scenes also works flawlessly. The same script runs consistently from the Slide Master.
It’s possible that the JavaScript was placed on a Slide Master that isn’t being used by your slides, or that some slides are still using your previous timer code.
If it would help, feel free to attach your current project file for troubleshooting.
- JohnMorley-a8f122 days agoCommunity Member
The problem (and its solution) became obvious once I looked at Story View. Earlier in the project I had set up a scene for out takes (which although not seen in the published project, were still published into the browser), into which I had copies of the slides with malfunctioning clocks.
Once the out takes scene was delete, all became fine in my world. So thanks again to both of you for fine solutions.
- Nedim22 days agoCommunity Member
Great! Good work...