Toggle menu
876
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Close to URL: Difference between revisions

From Catglobe Wiki
New page: -Chalenge You want the respondent to be automatically redirected to a URL when he clicks on the Close button -Code function closeToURL() { document.location = "http://www.catglobe.com";...
 
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
-Chalenge
<translate>
  You want the respondent to be automatically redirected to a URL when he clicks on the Close button
== Close URL ==


-Code
In order to show a specific site when he clicks on the Close button
 
As a questionnaire creator
 
I want the respondent to be automatically redirected to a URL when he clicks on the Close button
 
'''Example'''
 
When user finished the questionnaire , you want them to redirect to Catglobe homepage
 
=== Solution  ===
 
*Add a Page question to Questionnaire editor like below
*Go to menu Properties -&gt; Question properties -&gt; Common tab -&gt; Check End
 
[[Image:CloseURL Properties.png]]
 
*Go to menu Properties -&gt; Question scripts -&gt; Java script tab -&gt; Input below script
 
[[Image:CloseURL Code.png]]
 
=== Code ===
 
<source lang="javascript">
function closeToURL()
function closeToURL()
{
{
document.location = "http://www.catglobe.com";
document.location = "http://www.catglobe.com";
}
}
quest.close = closeToURL;
</source>


quest.close = closeToURL;
=== Source  ===
 
Questionnaire Resource Id on cg site: 159730
</translate>

Latest revision as of 08:19, 3 August 2017

<translate>

Close URL

In order to show a specific site when he clicks on the Close button

As a questionnaire creator

I want the respondent to be automatically redirected to a URL when he clicks on the Close button

Example

When user finished the questionnaire , you want them to redirect to Catglobe homepage

Solution

  • Add a Page question to Questionnaire editor like below
  • Go to menu Properties -> Question properties -> Common tab -> Check End

  • Go to menu Properties -> Question scripts -> Java script tab -> Input below script

Code

function closeToURL()
{
	document.location = "http://www.catglobe.com";
}
quest.close = closeToURL;

Source

Questionnaire Resource Id on cg site: 159730 </translate>