Check out the LimeSurvey source code on GitHub!

how to get the question answer in javascript?

More
2 years 8 months ago #108973 by iscar
i have a survey, which has 2 questions q1,q2.
i would like to add javascript in q2, i tried
<script type="text/javascript" charset="utf-8">
var q1answer={ q1.shown };
but canot get the value, i checked the manual, no content about it.
thanks for any help!

Please Log in to join the conversation.

More
2 years 8 months ago #108984 by Ben_V
hello,
I've got few idea but I think you have to remove the white-spaces included inside { q1.shown }
If not, your expression won't be parsed...

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
2 years 8 months ago - 2 years 8 months ago #108989 by iscar
i see,thanks for your reply!
i just confused by the blank,{,“,(
Last Edit: 2 years 8 months ago by iscar.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form