This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
en:create:timer-submit [28.04.2021 17:53] – [Implementation] sophia.schauer | en:create:timer-submit [28.04.2021 17:57] – [Display Countdown] sophia.schauer | ||
---|---|---|---|
Line 57: | Line 57: | ||
<script type=" | <script type=" | ||
<!-- | <!-- | ||
+ | |||
// Function to forward | // Function to forward | ||
function next() { | function next() { | ||
Line 108: | Line 109: | ||
<script type=" | <script type=" | ||
<!-- | <!-- | ||
+ | |||
// Function to forward | // Function to forward | ||
function weiter() { | function weiter() { | ||
Line 115: | Line 117: | ||
SoSciTools.submitPage(); | SoSciTools.submitPage(); | ||
} | } | ||
+ | |||
// Display countdown | // Display countdown | ||
var date0 = new Date(); | var date0 = new Date(); | ||
Line 137: | Line 140: | ||
out.appendChild(displayNode); | out.appendChild(displayNode); | ||
} | } | ||
+ | |||
+ | // Hide Next button (optional) | ||
+ | SoSciTools.submitButtonsHide(); | ||
+ | | ||
// Initialize forwarding | // Initialize forwarding | ||
SoSciTools.attachEvent(window, | SoSciTools.attachEvent(window, | ||
- | | + | |
- | SoSciTools.submitButtonsHide(); | + | |
// Additional timer to update the countdown | // Additional timer to update the countdown | ||
window.setInterval(updateCountdown, | window.setInterval(updateCountdown, | ||
Line 147: | Line 153: | ||
window.setTimeout(next, | window.setTimeout(next, | ||
}); | }); | ||
+ | |||
// --> | // --> | ||
</ | </ |