Check out the LimeSurvey source code on GitHub!

Exit and clear button returns from an external webpage to survey webpage

More
6 years 8 hours ago #57654 by sari2108
Hey guys,

My survey is integrated in an external webpage. That means the questionnaire can be filled out on this webpage while the survey is running on an other webserver. That works very well, but when I click the "exit and clear survey" button the user returns to the webserver where the survey originally is running. Is it possible to stay at the external webpage and to continue the survey there?

Greetings,
Sari

Please Log in to join the conversation.

More
6 years 4 hours ago - 6 years 4 hours ago #57674 by tpartner
I think you need to change the target of the onclick function from "_top" to "_self".

Add the following to the end of template.css:
$(document).ready(function() {
 
		$('input.clearall').attr('id', 'clearallbtn');
		var onclickStr = document.getElementById("clearallbtn").getAttribute('onclick');
 
		onclickStr = onclickStr.replace(/_top/, '_self');
		var newclick = new Function(onclickStr);
		$('input.clearall').attr('onclick', '').click(newclick);
 
	});

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 6 years 4 hours ago by tpartner.

Please Log in to join the conversation.

More
5 years 11 months ago #58005 by tpartner
Oops, what I meant was add the above code to template.js.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 11 months ago #58075 by sari2108
I've got it and it works very well. Thank you for your help!

Please Log in to join the conversation.

More
5 years 11 months ago #58092 by tpartner
Cool. As of 1.91RC6, this will be fixed in the core code - bugs.limesurvey.org/view.php?id=5011

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form