Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
en:create:timer-display [21.12.2014 12:04] – [Show Other Content] alexander.ritteren:create:timer-display [12.01.2016 09:21] – [Implementation] Update admin
Line 17: Line 17:
  
  
-Only a text element with the following content (created in **Text Elements and Labels**) is required. This text elements is dragged into the respective questionnaire page when composing the questionnaire.+Only a text element with the following content (created in **Text Elements and Labels**, //Display// as "HTML code") is required. This text elements is dragged into the respective questionnaire page when composing the questionnaire.
  
 <code javascript> <code javascript>
Line 23: Line 23:
 <!-- <!--
  
-// Function to show the buttons +// Nach dem Laden der Seite das Script starten
-function showButtons() { +
-  var buttons = document.getElementById("buttonsAuto"); +
-  // Restore normal display mode (show buttons) +
-  buttons.style.display = ""; +
-+
- +
-// Start the script after the page is loaded+
 SoSciTools.attachEvent(window, "load", SoSciTools.attachEvent(window, "load",
   function() {   function() {
-    // Search the buttons +    // Die Knöpfe ausblenden 
-    var buttons = document.getElementById("buttonsAuto"); +    SoSciTools.submitButtonsHide(); 
-    // Hide the buttons +    // Den Timer starten 
-    buttons.style.display = "none"; +    window.setTimeout(SoSciTools.submitButtonsDisplay, 60000); // Nach 1 Min = 60.000 ms
-    // Start the time +
-    window.setTimeout(showButtons, 60000); // after 1 Min = 60.000 ms+
   }   }
 ); );
Line 46: Line 37:
 </code> </code>
  
 +**Note:** This JavaScript code makes use of the SoSci Survey specific function ''SoSciTools.submitButtonsHide()'' to hide all buttons. You may specifically identify the submit button via ''%%document.getElementById("submit0")%%'' and change it's attribute ''.style.display'' to ''%%"none"%%''. For having the button re-appear, it may be necessary to write an additional function that restores the attribute to the empty string ''%%.style.display = ""%%''.
 ===== Show Other Content ===== ===== Show Other Content =====
  
en/create/timer-display.txt · Last modified: 12.08.2022 19:26 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki