This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:create:popup [26.01.2015 15:14] – [Open on Hover] alexander.ritter | en:create:popup [18.06.2015 14:16] – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Click to Show Information ====== | ====== Click to Show Information ====== | ||
- | Sometimes it helps if the participant can access additional information ((a short piece of text like this one here)) if needed. | + | Sometimes it helps if the participant can access additional information((a short piece of text like this one here)) if needed. |
**Tip:** More detailed information can also be opened in a separate pop-up window by using '' | **Tip:** More detailed information can also be opened in a separate pop-up window by using '' | ||
Line 49: | Line 49: | ||
===== Click for Information ===== | ===== Click for Information ===== | ||
- | Web content (so the content of a questionnaire page as well) can be changed dynamically by using Javascript. Displaying and hiding content entails very simple changes. Information is integrated regularly, but remains invisible at first. | + | Web content (so the content of a questionnaire page as well) can be changed dynamically by using JavaScript. Displaying and hiding content entails very simple changes. Information is integrated regularly, but remains invisible at first. |
- | You need [[: | + | You need [[: |
Line 74: | Line 74: | ||
</ | </ | ||
- | < | + | < |
<script type=" | <script type=" | ||
<!-- | <!-- | ||
Line 132: | Line 132: | ||
</ | </ | ||
- | The Javascript | + | The JavaScript |
Line 163: | Line 163: | ||
The code examples above are only able to display one piece of information per page. If you want to put multiple info buttons on a page, use the following code. | The code examples above are only able to display one piece of information per page. If you want to put multiple info buttons on a page, use the following code. | ||
- | Save the first code as a text element. Insert this text element __once__ (anywhere __before__ the other Javascript | + | Save the first code as a text element. Insert this text element __once__ (anywhere __before__ the other JavaScript |
Line 269: | Line 269: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | |||
+ | ==== Enlarge an Image ==== | ||
+ | |||
+ | Using an image as button, and a larger version of the image as " | ||
+ | |||
+ | <code html> | ||
+ | <div style=" | ||
+ | <img src=" | ||
+ | </ | ||
+ | <img src=" | ||
+ | |||
+ | <script type=" | ||
+ | <!-- | ||
+ | var info = new infoButton(); | ||
+ | info.registerInfo(" | ||
+ | //--> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | There is no distinct close button in the example, above -- the larger version itself may be clicked to close the zoom. | ||
Line 275: | Line 296: | ||
If you want to save whether a info button was clicked on, internal variables are needed to begin with. Create a new question with the type [[: | If you want to save whether a info button was clicked on, internal variables are needed to begin with. Create a new question with the type [[: | ||
- | Drag this question onto the questionnaire page __before__ the Javascript | + | Drag this question onto the questionnaire page __before__ the JavaScript |
Modify the third code (see above) by additionally specifying the IDs for the internal variables in which the use will be saved. For example: | Modify the third code (see above) by additionally specifying the IDs for the internal variables in which the use will be saved. For example: |