- Posts: 450
- Thank you received: 25
Ask the community, share ideas, and connect with other LimeSurvey users!
ricardo wrote: Hi Tony,
There small glitch in this workaround
The rows don't display as soon as the number is entered...they only show up after clicking somewhere else...is there a way to make the rows appear as soon as the number is entered.
this is a link to the question broaderimpacts.org/surveys/limesurvey/index.php/289571/lang-en
rg
What LimeSurvey version are you using? Did you try the latest attached .lss file with the default template?I too am having problems with this script on internet explorer 11. I've tried changing the file as suggested in the thread but this hasn't worked for me.
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ // Identify the questions var q1ID = '{QID}'; var q1 = $('#question'+q1ID+''); var q2 = $(q1).nextAll('.array-multi-flexi-text:eq(0)'); var q2ID = $(q2).attr('id').split('question')[1]; // Initial row handling handleRows($('.answer-item select', q1)); // Listener on the numeric input $('.answer-item select', q1).change(function() { handleRows(this); }); function handleRows(el) { var numRows = $(el).val(); $('tr.subquestion-list', q2).hide(); $('tr.subquestion-list', q2).each(function(i){ if(i >= numRows) { $('input[type="text"], select', this).val(''); } else { $(this).show(); } }) } }); </script>