- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
JavaScript in Question Editor gets removed
- TRCBerlin
- Topic Author
- Offline
- New Member
Less
More
5 years 5 months ago - 5 years 5 months ago #176653
by TRCBerlin
JavaScript in Question Editor gets removed was created by TRCBerlin
Hey folks,
LimeSurvey version: 3.13.1+180629
Browser: Mozilla Firefox 60.3.0esr (32-Bit)
I use a java script to switch the text style to password. It always worked until now. At first the script was completely gone, I pasted it once again, but when I saved and closed the editor parts of the script were missing and it is displayed as plain text.
This is the script:
I searched through the forums, if anyone else experienced similar issues, but did not find anything related to it. Neither did I find any configurations in my survey, that might be responsible for this issue.
Screenshots are attached, showing how it looks like before and after I save the question
Any help how to enable the script once again is much appreciated!
LimeSurvey version: 3.13.1+180629
Browser: Mozilla Firefox 60.3.0esr (32-Bit)
I use a java script to switch the text style to password. It always worked until now. At first the script was completely gone, I pasted it once again, but when I saved and closed the editor parts of the script were missing and it is displayed as plain text.
This is the script:
Code:
<script type='text/javascript' charset='utf-8'> $( document ).ready( function() { // self.sgqa ist der Identifier für das Antwortfeld. my_targetTextBox gibt die ID jquery-konform wieder var this_self='{self.sgqa}'; var my_targetTextBox='#answer' + this_self; // ändert den Texttypen auf Passwort $( my_targetTextBox ).attr( 'type', 'password' ); }); </script>
I searched through the forums, if anyone else experienced similar issues, but did not find anything related to it. Neither did I find any configurations in my survey, that might be responsible for this issue.
Screenshots are attached, showing how it looks like before and after I save the question
Any help how to enable the script once again is much appreciated!
Attachments:
Last edit: 5 years 5 months ago by TRCBerlin. Reason: double pasted the code
The topic has been locked.
- holch
- Away
- LimeSurvey Community Team
Less
More
- Posts: 11644
- Thank you received: 2738
5 years 5 months ago #176655
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic JavaScript in Question Editor gets removed
Did you set up your survey for being able to use Javascript according to the manual?
manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey
manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.