- Posts: 169
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
how to find the additional js in a survey?
- iscar
- Topic Author
- Offline
- Elite Member
Less
More
9 years 2 weeks ago #119097
by iscar
how to find the additional js in a survey? was created by iscar
my colleague give me a lss file make 1 year ago, i active this survey but get some problems. go through the logic file,no error.
finally, i find an additional js in q312. when you run the logic file, the additional js won't display. which means if you add some js, the js "hide".
just like a survey has more than 500 questions, it's vey hard to find js one by one.
is there any solution for this problem?
finally, i find an additional js in q312. when you run the logic file, the additional js won't display. which means if you add some js, the js "hide".
just like a survey has more than 500 questions, it's vey hard to find js one by one.
is there any solution for this problem?
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
9 years 2 weeks ago #119098
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 how to find the additional js in a survey?
how about searching in the lss file itself?
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.
- iscar
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 169
- Thank you received: 0
9 years 2 weeks ago #119099
by iscar
Replied by iscar on topic how to find the additional js in a survey?
if there's no better way i will do this.
i am not sure if ls can read the addtional js in logic file.at least, give a sign which question include the hide js.
if not , the hide js will become the risk bomb.
i am not sure if ls can read the addtional js in logic file.at least, give a sign which question include the hide js.
if not , the hide js will become the risk bomb.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
9 years 2 weeks ago #119105
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic how to find the additional js in a survey?
Hi,
In 2.05 : we show javascript (in script tag).
In 2.05 : we show javascript (in script tag).
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Attachments:
The following user(s) said Thank You: tpartner, Ben_V
The topic has been locked.
- iscar
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 169
- Thank you received: 0
9 years 2 weeks ago #119115
by iscar
Replied by iscar on topic how to find the additional js in a survey?
hi Denis,
it's hard to update from 2.0 to 2.05 because 2.05 doesn't support >=,<= in EM. lots of question in my survey use EM like {if(age>=18)}.
it's hard to update from 2.0 to 2.05 because 2.05 doesn't support >=,<= in EM. lots of question in my survey use EM like {if(age>=18)}.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
9 years 2 weeks ago #119116
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic how to find the additional js in a survey?
Hi 2.05 support >=, better write like this : age >= 18 (with space), but no problem/
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- iscar
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 169
- Thank you received: 0
9 years 2 weeks ago #119117
by iscar
Replied by iscar on topic how to find the additional js in a survey?
i tried to update to 2.05,but failed. i get the feedback is 2.05 support only lt gt, not the >=,<=.
lot's of ls users think it's strange why don't support >=,<=.
what's the meaning of (with space)?
{if(age<=18,'girl','woman')}
lot's of ls users think it's strange why don't support >=,<=.
what's the meaning of (with space)?
{if(age<=18,'girl','woman')}
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1128
- Thank you received: 329
9 years 2 weeks ago - 9 years 2 weeks ago #119123
by Ben_V
I have sometimes the same problem with old surveys... and I use the following process:
1) Search in the lss "<script" and replace everywhere with:
2) Add some css rules like:
If those rules are removed, added span tags remain neutral and don't affect anything.
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)
Replied by Ben_V on topic how to find the additional js in a survey?
Holch wrote: how about searching in the lss file itself?
I have sometimes the same problem with old surveys... and I use the following process:
1) Search in the lss "<script" and replace everywhere with:
Code:
<span class="jsinside"></span><script
2) Add some css rules like:
Code:
.jsinside:before { content:"JS INSIDE"} .jsinside {display: block;text-align:center;width:80px;margin:auto;background:#c00;color:#fff;font-weight:bold}
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)
Attachments:
Last edit: 9 years 2 weeks ago by Ben_V.
The following user(s) said Thank You: holch
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
9 years 2 weeks ago #119124
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 how to find the additional js in a survey?
With space: instead of write variables values and operatores as if they were one word you separate them with a space:
Your code which makes the ">" be subsituted by a html entity ">"
With space which according to denis is working also in LS 2.05:
Your code which makes the ">" be subsituted by a html entity ">"
Code:
{if(age<=18,'girl','woman')}
With space which according to denis is working also in LS 2.05:
Code:
{if(age <= 18,'girl','woman')}
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.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
9 years 2 weeks ago #119125
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 how to find the additional js in a survey?
Nice solution!
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.
- iscar
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 169
- Thank you received: 0
9 years 2 weeks ago #119126
by iscar
Replied by iscar on topic how to find the additional js in a survey?
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
9 years 2 weeks ago #119127
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 how to find the additional js in a survey?
Why not using search and replace in the lss file? Make a copy and the search and replace process should be done in about 2 seconds, even with 500 questions.
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.