I've got an onload setInterval countdown setup that I can't seem to stop from a button onclick event. ...getting a "timerId not defined" error on the onclick. Any ideas on a fix?
onload :
var timerId = setInterval(
function(){
.....etc
onclick :
clearInterval(timerId);
....also tried window.clearInterval(timerId);
Thanks