Welcome, Guest
Username: Password: Remember me

TOPIC: Redirect after time to URL (THANKS SCREEN)

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

  • vadindot
  • vadindot's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 51
  • 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.

Re: Redirect after time to URL (THANKS SCREEN) 3 years 5 months ago #58449

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 249
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.

Re: Redirect after time to URL (THANKS SCREEN) 3 years 5 months ago #58465

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4141
  • Thank you received: 767
  • Karma: 349
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.150 seconds
Donation Image