Java Script in Questions not working

More
1 week 22 hours ago #176280 by lemmon
lemmon created the topic: Java Script in Questions not working
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.

Please Log in or Create an account to join the conversation.

More
1 week 11 hours ago #176284 by tpartner
tpartner replied the 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.

Please Log in or Create an account to join the conversation.

More
1 week 3 hours ago #176313 by jelo
jelo replied the 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.

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey
Attachments:
The following user(s) said Thank You: lemmon

Please Log in or Create an account to join the conversation.

More
6 days 23 hours ago #176329 by lemmon
lemmon replied the 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.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!