- Posts: 23
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
$(document).ready(function() { if($('p#tokenmessage').length > 0 && $('#tokenform').length == 0) { var stringIndex = $('p#tokenmessage').text().indexOf('Diese Umfrage ist beendet und steht nicht mehr zur Verfügung'); if(stringIndex >= 0) { $('p#tokenmessage').html('This survey is CLOSED!<br /><br />Go away!'); } } });
$(document).ready(function() { if($('p#tokenmessage').length > 0 && $('#tokenform').length == 0) { var stringIndex = $('p#tokenmessage').text().indexOf('Esta encuesta ya no está disponible'); if(stringIndex >= 0) { $('p#tokenmessage').html('This survey is CLOSED!<br /><br />Go away!'); } } });
$(document).ready(function() { if($('p#tokenmessage').length > 0 && $('#tokenform').length == 0) { var stringIndex = $('p#tokenmessage').text().indexOf('Esta encuesta ya no está disponible'); if(stringIndex >= 0) { window.location = "https://google.com"; $('p#tokenmessage').html('This survey is CLOSED!<br /><br />You are being redirected to our website.'); } } });
$(document).on('ready pjax:scriptcomplete',function(){ var lsText = 'We are sorry but the survey is expired and no longer available.'; var newText = 'This survey is CLOSED!<br /><br />You are being redirected to our website.'; if($('p.message-0').length == 1 && $('p.message-0:first').text() == lsText) { $('p.message-0:first').text(newText); window.location = "https://google.com"; } });