Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:create:dynamic [26.11.2020 21:08] – [The Basics] sophia.schaueren:create:dynamic [16.12.2020 16:05] – [Example 1: Visible Selection] mohadmun
Line 31: Line 31:
  
  
-The following JavaScript code is saved as a text element, dragged and dropped __into__ questions "JN01" and "TX01" in the questionnaire page.+The following JavaScript code is saved as a text element (//display//: "HTML-Code"), dragged and dropped __into__ questions "JN01" and "TX01" in the questionnaire page.
  
  
Line 45: Line 45:
   // the two pipes (||) are a logicial "or"   // the two pipes (||) are a logicial "or"
   // the condition checks: is option A selected or is B selected?   // the condition checks: is option A selected or is B selected?
-  if ((optionA.checked|| (optionB.checked)) {+  if (optionA.checked || optionB.checked) {
     // if "yes" or "maybe" is selected, then the question is shown     // if "yes" or "maybe" is selected, then the question is shown
     // no input ("") uses the default setting (display as usual)     // no input ("") uses the default setting (display as usual)
Line 114: Line 114:
 ==== JavaScript Code ==== ==== JavaScript Code ====
  
-The following HTML/JavaScript code is saved in a text element (e.g. with the ID ''js_dynamic''):+The following HTML/JavaScript code is saved in a text element (e.g. with the //ID// "js_dynamic", //display//: "HTML-Code"):
  
 <code javascript> <code javascript>
en/create/dynamic.txt · Last modified: 07.12.2023 20:51 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