- Posts: 20
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
<script type="text/javascript" charset="utf-8">function shuffle(array) { var currentIndex = array.length, temporaryValue, randomIndex; // While there remain elements to shuffle... while (0 !== currentIndex) { // Pick a remaining element... randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1; // And swap it with the current element. temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; }$(document).on('ready pjax:scriptcomplete',function(){ // Fill the array, hier Zahlen von 1 - 20 var arr = ; for (var i = 1; i < 21; i++) { arr.push(i); } arr = shuffle(arr); $('#question{QID} input[type="text"]:eq(0)').val(arr[0]); $('#question{QID} input[type="text"]:eq(1)').val(arr[1]); $('#question{QID} input[type="text"]:eq(2)').val(arr[2]); $('#question{QID} input[type="text"]:eq(3)').val(arr[3]); $('#question{QID} input[type="text"]:eq(4)').val(arr[4]); ... $('#question{QID} input[type="text"]:eq(19)').val(arr[19]); $('#question{QID}').hide(); }); </script>
<td> <img src="PathToImage/image{QPool_1}.jpg" /> </td>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Does it mean, there are several pictures on one card? According to your code there are 6 pictures on one card.where participants are supposed to choose between two different choice cards based on pictures shown to them.
This is repeated 10 times, with always different variations of the cards.The participants are supposed to play several rounds (choose between 10 different sets of choice cards).
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
... <div class="col"> <img style="width:30%"; src="https://www.mysurvey.de/userfiles/Hamburg-Ballett_{substr(QPool_1,0,2)}.jpg"/> <img style="width:30%"; src="https://www.mysurvey.de/userfiles/Hamburg-Ballett_{substr(QPool_1,2,2)}.jpg"/> <img style="width:30%"; src="https://www.mysurvey.de/userfiles/Hamburg-Ballett_{substr(QPool_1,4,2)}.jpg"/> </div> ...
Please Log in to join the conversation.
Please Log in to join the conversation.
<div class="col"> <img style="width:30%"; src="https://www.mysurvey.de/userfiles/Hamburg-Ballett_{substr(QPool_1,0,2)}.jpg"/> <img style="width:30%"; src="https://www.mysurvey.de/userfiles/Hamburg-Ballett_{substr(QPool_1,2,2)}.jpg"/> <img style="width:30%"; src="https://www.mysurvey.de/userfiles/Hamburg-Ballett_{substr(QPool_1,4,2)}.jpg"/> </div>
Please Log in to join the conversation.