Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
en:create:javascript [07.01.2015 21:08] – [Learn JavaScript] alexander.ritter | en:create:javascript [07.01.2015 21:10] – [Inserting JavaScript] alexander.ritter |
---|
In **Compose Questionnaire**, the text element is dragged & dropped onto one, or multiple pages, in the questionnaire, or the PHP function ''[[:en:create:functions:text|text()]]'' can also be used. | In **Compose Questionnaire**, the text element is dragged & dropped onto one, or multiple pages, in the questionnaire, or the PHP function ''[[:en:create:functions:text|text()]]'' can also be used. |
| |
**Note:** JavaScript can only access HTML elements (e.g. questions) that have already been loaded in the HTML page. Therefore, it makes sense to put JavaScript at the end of the page. | **Note:** JavaScript can only access HTML elements (e.g. questions) that have already been loaded in the HTML page. It therefore makes sense to put JavaScript at the end of the page. |
| |
**Tip:** In principle, HTML/JavaScript code can also be inserted directly into an HTML element of the questionnaire page. However, text elements offer several advantages, which is why inserting the code directly is not recommended. | **Tip:** In principle, HTML/JavaScript code can also be inserted directly into an HTML element of the questionnaire page. However, text elements offer several advantages, which is why inserting the code directly is not recommended. |