- Posts: 12109
- Thank you received: 2840
Ask the community, share ideas, and connect with other LimeSurvey users!
Yes, there is, WHEN an answer is selected.Perhaps there's a way to automatically trigger the next page when an answer is selected?
This is probably due to the low frustration tolerance of the youth.I find it so frustrating ...
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Hide the "Next" button $('#ls-button-submit').hide(); $('#question115').hide(); $('#question130').hide(); var vid = document.getElementById("myvideo"); vid.volume = 0.7; vid.onended = function() { // Hide video //$(this).hide(); $('#question114').hide(); // Show sliders $('#question115').show(); $('#question130').show(); // Show the "Next" button var enableNext1 = false; var enableNext2 = false; var v = $('#answer562798X17X115SQ001slid').change(function() { enableNext1 = true; if(enableNext2) $('#ls-button-submit').show(); // if also the second one was moved }); var v = $('#answer562798X17X130SQ001slid').change(function() { enableNext2 = true; if(enableNext1) $('#ls-button-submit').show(); //if also the first one was moved }); } //onended }); </script>
This is neither cryptic nor a hack. It is normal behaviour.the cryptic options is how to center the slider (and it still feels a bad hack)
First you must not use the developer tools. These values are displayed in the GUISo for the ids (eg #question114 and #answer562798X17X115SQ001slid) I have to look them up from the developer tools and manually change the script for every new group I have.
// Hide slider block $('#question'+qID1).hide(); $('#question'+qID2).hide();
// Hide video block $('#question'+qID).hide(); // Show slider block $('#question'+qID1).show(); $('#question'+qID2).show();
If the video and the two slider question have question IDs in ascending order,
you may use the variables {SID}, {GID}, {QID} which give you the survey-, group- and questionID of the actual question (the video).