Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Change Countdown Timers

A while ago j.bratton posted a great piece of script "YouTube Autoplay No branding etc. Countdown Timers V7" (https://sawtoothsoftware.com/forum/192/youtube-autoplay-no-branding-etc-countdown-timers-v7).

I have successfully used this but now face the problem that the video can be of different length (from 30" to 1'30"), there are 3 slots and the videos are randomly assigned.

Unfortunately I have no programming skills esp. javascript.

How would you suggest modify the original script, below:

    function WaitSubmit()


    var originalValue;
    var timeOutRemaining = 11; //3 Seconds

On the basis of variable Ask1 which can have a value from 1 to 7 (with videos of 3 different lengths)
asked Aug 24, 2012 by anonymous
retagged Sep 13, 2012 by Walter Williams

1 Answer

+1 vote
Couldn't you add a bit of structure to the random display of the videos?  For example, if the video shown is based on a different question, put each video on its own page with its own timeout value, and then use skip logic to display the correct page to someone?  Even if it is truly random, i.e. you are doing something like generating a random number between 1 and 3, you could still have that affect skip logic and only display 1 page of out 3, right?
answered Aug 24, 2012 by Brian McEwan Gold Sawtooth Software, Inc. (48,600 points)
Thank you Brian, works perfectly (time has moved on from when I undertook limited programming in Fortran - we have become somewhat decadent)