Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Two different scripts disable each-other

  • MarcoV01
  • MarcoV01's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 8 months ago #138073 by MarcoV01
Hey
I am using some different scripts that I found in your forums
1.) I am using a script from Tpartner to hide a short-text question and put the text in a "other" field from an Matrix-Array question type (which is quite awesome...thanks for that Tpartner :) )
Code:
<script type="text/javascript" charset="utf-8">
  $(document).ready(function() {
    // Identify the questions
    var q1 = $('#question'+{QID}+'');
    var q2 = $(q1).nextAll('.text-short:eq(0)');
    // Hide the short-text question
    $(q2).hide();
    // Move the hidden text input into the array
    $('th.answertext:last', q1).append($('input[type="text"]', q2));
    // Some styling...
    $('input[type="text"]', q1).css({
      'width': '50%'
    });
  });
</script>


2. I am using some scripts to use qtip in the template (I used the solution from Tpartner:
www.limesurvey.org/community-services/fo...-words-or-selections


Problem is, that since I added those lines to use qtip, my other script does not work any-more......

Some suggestion????
The topic has been locked.
More
7 years 8 months ago #138077 by fvanderstarre
Replied by fvanderstarre on topic Two different scripts disable each-other
Looks like the two scripts were set up for different versions of LimeSurvey. "/scripts/jquery/jquery.qtip.js" is no longer included in LimeSurvey (2.06+).
The topic has been locked.
  • MarcoV01
  • MarcoV01's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 8 months ago #138078 by MarcoV01
Replied by MarcoV01 on topic Two different scripts disable each-other
OH.. :dry:
O.k.....well its o.k, with the span elements the mouse over is still working......

Thanks for the reply
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #138083 by tpartner
Replied by tpartner on topic Two different scripts disable each-other
One of those scripts is several years old so it may not work current versions of LimeSurvey.

What LS version are you using? Can you attach a small test survey containing a single group with those scripts?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • MarcoV01
  • MarcoV01's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 8 months ago #138085 by MarcoV01
Replied by MarcoV01 on topic Two different scripts disable each-other
Yes I think its like 3 years old :huh: ..... but separately it works very good.....

Attachments are a small survey and a template with the above explained changes

I am using LS 2.5 with build 160614

Many thanks in advance!!!!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #138087 by tpartner
Replied by tpartner on topic Two different scripts disable each-other

...but separately it works very good...

Not for me. There are no tooltips - all you see is the title attribute and the text input is not moved.

Problems:

1) The qtip.js file is not included in your template directory
2) The path to the qtip.js file in startpage.pstpl is incorrect - it needs to be an absolute path or include the {TEMPLATEURL} placeholder to point to your template directory
3) I see no script to apply the tooltips in any question source
4) The script to move the text input should be in the source of the array question, not in the source of the short-text.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #138088 by tpartner
Replied by tpartner on topic Two different scripts disable each-other
#3 should be amended - there is a call in template.js for the tooltips but it is incorrect for the new version of qTip.

Here is a working template and survey:

File Attachment:

File Name: default_wi...p_v2.zip
File Size:302 KB


File Attachment:

File Name: limesurvey...6347.lss
File Size:18 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • MarcoV01
  • MarcoV01's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 8 months ago #138089 by MarcoV01
Replied by MarcoV01 on topic Two different scripts disable each-other
Hi
Thanks for the reply....hmm its my fault......in the hurry I did put the script in the false question source...

There seems to be a problem with the template......when I try to upload it says that there is no template in the zip folder.....
The topic has been locked.
  • MarcoV01
  • MarcoV01's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 8 months ago #138092 by MarcoV01
Replied by MarcoV01 on topic Two different scripts disable each-other
I managed to open the template (there was a other folder in the zip)
But when I upload the template, some of the scripts are not loaded???? (It says only partially uploaded....
Any suggestion why?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #138097 by tpartner
Replied by tpartner on topic Two different scripts disable each-other
Try this copy of the template.

File Attachment:

File Name: default_wi...v2-2.zip
File Size:297 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • MarcoV01
  • MarcoV01's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 8 months ago #138101 by MarcoV01
Replied by MarcoV01 on topic Two different scripts disable each-other
Still receiving this problem:
Übersprungene Dateien (skipt data):

• Datei: css/
• Datei: css/awesome-bootstrap-checkbox/
• Datei: css/jquery.qtip.min.css
• Datei: files/
• Datei: fonts/
• Datei: fonts/glyphicons-halflings-regular.woff2
• Datei: scripts/
• Datei: scripts/jquery.qtip.min.js
• Datei: views
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 8 months ago #138117 by tpartner
Replied by tpartner on topic Two different scripts disable each-other
Here's a new copy with another name to avoid confusion.

File Attachment:

File Name: default_wi...p_v3.zip
File Size:297 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: MarcoV01
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose