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
  • iscar's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 11 months ago #119097 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?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 11 months ago #119098 by holch
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
  • iscar's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 11 months 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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 11 months ago #119105 by DenisChenu
Replied by DenisChenu on topic how to find the additional js in a survey?
Hi,

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.
The following user(s) said Thank You: tpartner, Ben_V
The topic has been locked.
  • iscar
  • iscar's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 11 months 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)}.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 11 months ago #119116 by DenisChenu
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
  • iscar's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 11 months 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')}
The topic has been locked.
More
8 years 11 months ago - 8 years 11 months ago #119123 by Ben_V
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}
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)
Attachments:
Last edit: 8 years 11 months ago by Ben_V.
The following user(s) said Thank You: holch
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 11 months ago #119124 by holch
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 "&gt;"
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
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 11 months ago #119125 by holch
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
  • iscar's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
8 years 11 months ago #119126 by iscar
Replied by iscar on topic how to find the additional js in a survey?

all the suvey has EM like age>=, height<=, it means user will recreate survey if update from 2.0 to 2.05??
it's terrible thing to revise them one by one.
each survey has more than 500 questions, oh my god!
i never think the ls update is not sustainable...
Attachments:
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 11 months ago #119127 by holch
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.

Lime-years ahead

Online-surveys for every purse and purpose