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

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

Exit and clear button returns from an external webpage to survey webpage 5 years 9 months ago #57654

  • sari2108
  • sari2108's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
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
The administrator has disabled public write access.

Exit and clear button returns from an external webpage to survey webpage 5 years 9 months ago #57674

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
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: 5 years 9 months ago by tpartner.
The administrator has disabled public write access.

Exit and clear button returns from an external webpage to survey webpage 5 years 9 months ago #58005

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
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.
The administrator has disabled public write access.

Aw: Re: Exit and clear button returns from an external webpage to survey webpage 5 years 9 months ago #58075

  • sari2108
  • sari2108's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
I've got it and it works very well. Thank you for your help!
The administrator has disabled public write access.

Aw: Re: Exit and clear button returns from an external webpage to survey webpage 5 years 9 months ago #58092

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
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.
The administrator has disabled public write access.
Time to create page: 0.225 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form