- Posts: 58
- Thank you received: 9
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Identify this question var thisQuestion = $('#question{QID}'); // Hide this question thisQuestion.hide(); // Load the text input $('input.text', thisQuestion).val("Cookies Enabled is: " + navigator.cookieEnabled + "; Browser name is: " + navigator.appName + "; Browser code name is: " + navigator.appCodeName + "; Engine: " + navigator.product); }); </script>
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Identify this question var thisQuestion = $('#question{QID}'); // Hide this question thisQuestion.hide(); // Load the text input $('input.text:eq(0)', thisQuestion).val(navigator.cookieEnabled); $('input.text:eq(1)', thisQuestion).val(navigator.appName); $('input.text:eq(2)', thisQuestion).val(navigator.product); }); </script>
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); // Hide this question thisQuestion.hide(); // Load the text input $('input:text:eq(0)', thisQuestion).val(navigator.cookieEnabled); $('input:text:eq(1)', thisQuestion).val(navigator.appName); $('input:text:eq(2)', thisQuestion).val(navigator.product); }); </script>
It works for me. Can you activate a test survey and give a link here?Still doesn't seem to work. The fields are returning blanks on the view responses page.