Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Redirect after time to URL (THANKS SCREEN)

Redirect after time to URL (THANKS SCREEN) 5 years 6 months ago #58441

  • vadindot
  • vadindot's Avatar
  • Offline
  • Senior Lime
  • Posts: 55
  • Thank you received: 1
  • Karma: 0
My latest request....

This is for an open survey, once the respondent gets to the "THANKS" screen, we'd like it to wait 5 seconds and then redirect back to the beginning for the next person. My client still wants the "THANKS" screen (I already recommended just redirecting after hitting SUBMIT).
The administrator has disabled public write access.

Redirect after time to URL (THANKS SCREEN) 5 years 6 months ago #58449

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6009
  • Thank you received: 371
  • Karma: 260
You should be able to add some Javascript to the thanks message and after X seconds the script redirects the user to a predefined URL. Should be no more than 5-6 lines of code, Google is your friend...

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Redirect after time to URL (THANKS SCREEN) 5 years 6 months ago #58465

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6323
  • Thank you received: 1407
  • Karma: 547
Add something like this to the end message.
<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function(){
 
		var url = 'http://somesurveysite.com/limesurvey//index.php?sid=12345&newtest=Y&lang=en';
 
		setTimeout(function() { 
			window.location.replace(url);
		}, 5000);
	});
 
</script>
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
Time to create page: 0.195 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form