Welcome, Guest
Username: Password: Remember me

TOPIC: Problems getting random navigation working

Problems getting random navigation working 7 months 1 day ago #106562

  • mvdct
  • mvdct's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 41
  • Thank you received: 1
  • Karma: 0
Hi Limesurvey community,

Can you help me? I've got stuck trying to apply random navigation paths through a questionnaire.

I'm adapting a survey I've used before. In the original version a random number was generated between 1 and 3.999 (inter-eq), and that number determined which question participants saw on the following question group (interventions). This worked great.


Now I'm trying to adapt the above format and I've got stuck. Attached are two cut down versions of where I am at.


Version 1 is very similar to the original. First a random number. Then a question based on that random number. The equations work fine. However, I'd put some javascript in the original survey to stop people advancing through the page too quickly. It worked fine in the original - where I didn't want anyone jumping through the questions. However, in this new version, despite the fact the javascript is only present in questions v1 and v2 it is also triggered for v3. So my question is this: is there any way the javascript can happen for v1 and v2 but not v3? (FYI: v3 is a control condition and doesn't need a delay)


In version 2, I was trying something slightly more complicated and create more navigation pathways through the questionnaire. So now, a random number is generated between 1 and 6.999. In the original version and version 1 it was straight forward, the relevance equation for the later questions was along the lines of: "audio == 1". In other words: "do this question only if the random number is this".

In version 2 I was wanting to trigger questions on the basis of: "audio == 1 or 2". In other words: "do this question if the random number is either 1 or 2". However when I entered that into the equation, the LS printing the question twice on the screen. I'm not sure what I'm doing wrong. My question is this: what should the relevance equation be?


As I say, both version 1 & 2 of the survey attached.

Best,
Miles

Tested in both IE and FF. LS: version 2.05+ Build 140116.
Attachments:
The administrator has disabled public write access.

Problems getting random navigation working 7 months 12 hours ago #106581

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4271
  • Thank you received: 805
  • Karma: 369
Regarding your first question - it's not possible that the JavaScript is acting on version 3 unless it is present there. It must be in the source of one of the questions or in template.js.

Your relevance equation for version 2 should be something like:
audio == 1 OR audio == 2


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: mvdct

Problems getting random navigation working 6 months 4 weeks ago #106630

  • mvdct
  • mvdct's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 41
  • Thank you received: 1
  • Karma: 0
Hi,

Thanks for correcting my error on the relevance equation. What you suggested works perfectly.

As for the JS. Apologies, let me clarify. I just checked again. There is no JS in the question v3, but there is in question v1 and v2 of the same question group. It should all be there in version1.lss in the first post.

Thanks again for your help.

Best,
Miles
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.134 seconds
Donation Image