I am building an online survey, 11 questions in length. The survey is
comeplte, I just have one more piece of functionality to build into
it.
I wish to present a series of five questions(q5-q10) whose order will
be randomly rotated for each respondent. The survey engine collects
the data via a perl script, and javascript determines the path of the
survey.
The snippet below is what is already built in to the page. I need this
script altered to include on six pages, the first being the page
preceding the random sequence of 5(q4), and the 5 pages(q5-q10)
themselves. No one should get asked the same question twice, the
respondent should see each of q5-q10 in random order until all the
questions have been asked.
After being asked each of the five questions, all respondents will
proceed to q11.
Below is an example of how the survey currently determines the path
based upon the answer to the question. I would like to determine the
path of these 5 pages as illustrated above.
<script type="text/javascript" language="JavaScript1.2"><!--
function PdcProcessPage(){
NextPage();
return true;
}
function NextPage(){
document.PdcSurvey.PdcNextPage.value ="/mytest/mytest002.htm";
// if Choice #1 of question Q1 selected then go to question Q3.
if(document.PdcSurvey.QQ1[0].checked){document.PdcSurvey.PdcNextPage.value="/mytest/mytest003.htm";
return;}
}
// --></script> |