Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Java Script in Questions not working

  • lemmon
  • lemmon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #176280 by lemmon
Java Script in Questions not working was created by lemmon
Hello LimeSurvey Community

I am new here, and also have become more active with LS recently. Great tool, thanks so much for this.


Now my question: I am trying to implement a consent forum at the beginning of my survey, and tried this:
www.limesurvey.org/forum/can-i-do-this-w...if-consent-not-given


Unfortunately, it does not work. I tried some variations to no avail. I have disabled "Filter HTML for XSS" in general settings. Then I downloaded the "Default Values In One Scale Of A Dual-scale Array Question" from here:
manual.limesurvey.org/Workarounds:_Manip...s_in_array_questions

This doesn't work either. The following example works:

<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:complete',function() {
alert("Test!");
});
</script>

Any ideas why the consent script above doesn't work, and neither the default value example above? I am on version 3.14.10+180924, tried both Chrome and IE.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #176284 by tpartner
Replied by tpartner on topic Java Script in Questions not working
Both of the scripts you tried are for a LimeSurvey version more than 4 years old.

What exactly are you trying to do?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
5 years 4 months ago #176313 by jelo
Replied by jelo on topic Java Script in Questions not working

lemmon wrote: implement a consent forum

forum? Or form?

With the current LS 3.X version you can use the privacy data policy feature.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: lemmon
The topic has been locked.
  • lemmon
  • lemmon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #176329 by lemmon
Replied by lemmon on topic Java Script in Questions not working
Thank you for your response, tpartner. I will study the js differences between the versions. I was trying to implement a consent solution based on the first link in my post.

Jelo, many thanks for bringing to my attention that LS3 now has consent functionality built it. This is exactly what I need, and for now I will use that.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose