Welcome, Guest
Username: Password: Remember me

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 3 years 4 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.

Re: Exit and clear button returns from an external webpage to survey webpage 3 years 4 months ago #57674

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4050
  • Thank you received: 740
  • Karma: 341
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 3 years 4 months ago by tpartner.
The administrator has disabled public write access.

Re: Exit and clear button returns from an external webpage to survey webpage 3 years 4 months ago #58005

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4050
  • Thank you received: 740
  • Karma: 341
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Aw: Re: Exit and clear button returns from an external webpage to survey webpage 3 years 4 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.

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

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4050
  • Thank you received: 740
  • Karma: 341
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.

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.105 seconds
Donation Image