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?

More
10 years 10 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.
More
10 years 10 months ago #119098 by holch
how about searching in the lss file itself?

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
10 years 10 months ago #119099 by iscar
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.
More
10 years 10 months ago #119105 by DenisChenu
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 support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: tpartner, Ben_V
The topic has been locked.
More
10 years 10 months ago #119115 by iscar
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.
More
10 years 10 months ago #119116 by DenisChenu
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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
10 years 10 months ago #119117 by iscar
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
10 years 10 months ago - 10 years 10 months ago #119123 by Ben_V

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)
Last edit: 10 years 10 months ago by Ben_V.
The following user(s) said Thank You: holch
The topic has been locked.
More
10 years 10 months ago #119124 by holch
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')}

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
10 years 10 months ago #119125 by holch
Nice solution!

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
10 years 10 months ago #119126 by iscar

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...
The topic has been locked.
More
10 years 10 months ago #119127 by holch
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.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
10 years 10 months ago #119132 by iscar
i still don't understang how could ls regard <= as html tag.
if regard <b ,<table,<p as html tag, it's good to add those tag in coding.
or despite of <= as html tag.

how could a software regard <= as html tag? is that a anti human design?
absolutely violate the sustainable rule.
is there anything wrong in my update process?
The topic has been locked.
More
10 years 10 months ago - 10 years 10 months ago #119138 by DenisChenu
The problem with space:

If you use AGE<AGE2 (for example) : your borwser thing it's start a new tag.
With space after : no new tag.

But < is never tranlated to & lt ; in last version

See : github.com/LimeSurvey/LimeSurvey/commit/...dedacd0ed2d8e89181f5 for the fix to ckeditor config

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
Last edit: 10 years 10 months ago by DenisChenu.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose