Can't add javascript to a question

More
5 years 7 months ago #78918 by asklepio
asklepio created the topic: Can't add javascript to a question
Hi,

I'm a newbie, and i want add javascript code to a question I created.
so i added this under "source"
Question...
<script type="text/javascript" charset="utf-8">

alert("Test!");

</script>

I saved it and when i edit de question again, this is what i get:
Question... <sc<x>ript type="text/javascript" charset="utf-8"> alert("Test!"); </sc<x>
and the javascript is not working..

Did i forget anything before adding javascript?
thanks!

Please Log in to join the conversation.

More
5 years 7 months ago #78920 by Ben_V
Ben_V replied the topic: Can't add javascript to a question
Set the 'Filter HTML for XSS' option to 'no'
Path: Global Settings > SECURITY > Filter HTML for XSS

Ben/

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)
The following user(s) said Thank You: DenisChenu, asklepio

Please Log in to join the conversation.

More
5 years 7 months ago #78930 by Mazi
Mazi replied the topic: Can't add javascript to a question
For more information on how to add Javascript to a survey, have a look at the blog post on www.limesurvey-consulting.com :
How to use JavaScript at a Limesurvey template or survey


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!