Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA: randomly assign participants to groups

randomly assign participants to groups 9 Monate 3 Wochen her #101488

  • jvandernoll
  • jvandernolls Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 12
  • Karma: 0
Hi Cecilia,
If you go to your question, you should include the code below in your source code (click source)
- This is for 4 conditions;
- you have to adjust the SurveyIdXGroupIdXQuestionId to correspond with your own Id-numbers (leave the X between the Id-numbers);
- and the last line $('#question1979503').hide(); is to hide the question with question Id number 1979503 -- you need to adjust this too to correspond with your question ID

Hope this helps!

Here's the code:


<script type="text/javascript">
<!--
$(document).ready(function()
{
// Find a random number between 1 and 4
var randNumber = Math.floor(Math.random()*4 + 1);
$('input#answerSurveyIdXGroupIdXQuestionId').val(randNumber);
checkconditions(randNumber,'SurveyIdXGroupIdXQuestionId','text');
$('#question1979503').hide();
})
//-->
</script>
Der Administrator hat öffentliche Schreibrechte deaktiviert.
  • Seite:
  • 1
  • 2
Moderatoren: ITEd
Ladezeit der Seite: 0.136 Sekunden
Donation Image