TypeError: (intermediate value).CountdownTimer is not a constructor

Hello,

ok, the code I provided was not tested online. I made some changes and tested I locally in a browser. O, set the Code type of the code-component in which you code the countdown timer to both. All changes are Javascript-changes only. In the Begin Experiment tab add

minutes = 0;
seconds = 0;
timeText = "";

to the Javascript side on the right. In the Begin routine tab, change new core.CountdownTimer(300) to new util.CountdownTimer(300), see below. You need to use the number of seconds that suits your experiment.

if ((! countdownStarted)) {
    countdownClock = new util.CountdownTimer(300);
    countdownStarted = true;
}

That should do the trick.

Best wishes Jens

1 Like