- Posts: 74
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
New Lime Version won't let me use the same script for array headings
- Winocll_48635
- Topic Author
- Offline
- Banned
Less
More
4 years 5 months ago #190878
by Winocll_48635
Replied by Winocll_48635 on topic New Lime Version won't let me use the same script for array headings
so this script does work (though it doesn't get me exactly what i need)...
But this code doesn't work...
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // IDENTIFY THIS QUESTION var thisQuestion = $('#question{QID}'); // HIDE SUB-QUESTION $('.subquestions-list .col-responses .col-answers', thisQuestion).hide(); $('.subquestions-list thead td', thisQuestion).hide(); $('.subquestions-list .answertext', thisQuestion).hide(); $('.subquestions-list col', thisQuestion).attr('width', (100/$('.subquestions-list col', thisQuestion).length)+'%'); // ADD HEADER ROW $('table.subquestions-list thead', thisQuestion).prepend('<tr class="new-header">\ <th colspan="11" style="text-align:left;">Poor<span style="float:right">Excellent</span></th>\ </tr>'); }); </script>
But this code doesn't work...
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Insert the column categories $('#question{QID} table.subquestion-list thead tr:eq(0) td:eq(0)').remove(); $('#question{QID} table.subquestion-list thead').prepend('<tr class="ls-heading">\ <td rowspan="2" colspan="2"></td>\ <th class="answer-text inserted-header" colspan="3">Dissatisfied</th>\ <th class="answer-text inserted-header" colspan="5"> </th>\ <th class="answer-text inserted-header" colspan="3">Very Satisfied</th>\ </tr>'); }); </script>
The topic has been locked.
- Winocll_48635
- Topic Author
- Offline
- Banned
Less
More
- Posts: 74
- Thank you received: 1
4 years 5 months ago #190879
by Winocll_48635
Replied by Winocll_48635 on topic New Lime Version won't let me use the same script for array headings
The LSS file...
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
4 years 5 months ago #190902
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic New Lime Version won't let me use the same script for array headings
Seriously? You provide a survey with 50 mandatory questions displayed question-by-question. Why are you making it so difficult for us to help you.
I say again, can you attach a small sample survey (.lss file) containing only that question?
I say again, can you attach a small sample survey (.lss file) containing only that question?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Winocll_48635
- Topic Author
- Offline
- Banned
Less
More
- Posts: 74
- Thank you received: 1
4 years 5 months ago #190923
by Winocll_48635
Replied by Winocll_48635 on topic New Lime Version won't let me use the same script for array headings
The problem is with the script in the OP. In version 3 limesurvey apparently has different naming conventions for the calls.
I need help converting the OP script into a LimeSurvey version 3 compatible script. Anyone who can help with that i would greatly appreciate it.
I need help converting the OP script into a LimeSurvey version 3 compatible script. Anyone who can help with that i would greatly appreciate it.
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12923
- Thank you received: 3977
4 years 5 months ago #190927
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic New Lime Version won't let me use the same script for array headings
You still didn't say what you are going to achieve.
I did not find a question "OP".
But maybe this helps.
www.limesurvey.org/forum/can-i-do-this-w...rvey?start=15#186378
What exactly do you like to get?so this script does work (though it doesn't get me exactly what i need)...
I did not find a question "OP".
But maybe this helps.
www.limesurvey.org/forum/can-i-do-this-w...rvey?start=15#186378
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: Winocll_48635
The topic has been locked.
- Winocll_48635
- Topic Author
- Offline
- Banned
Less
More
- Posts: 74
- Thank you received: 1
4 years 5 months ago #191172
by Winocll_48635
Replied by Winocll_48635 on topic New Lime Version won't let me use the same script for array headings
That last post helped...the problem was that LimeSurvey version 2x used...
While version 3x uses...
Code:
$(document).ready(function()
While version 3x uses...
Code:
$(document).on('ready pjax:scriptcomplete',function()
The topic has been locked.
- DenisChenu
- Away
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
4 years 5 months ago #191199
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 New Lime Version won't let me use the same script for array headings
It's due to ajax mode , in last version : it was totally disable …
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.