<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.catglobe.com/index.php?action=history&amp;feed=atom&amp;title=Basic_Hints</id>
	<title>Basic Hints - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.catglobe.com/index.php?action=history&amp;feed=atom&amp;title=Basic_Hints"/>
	<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Basic_Hints&amp;action=history"/>
	<updated>2026-04-30T14:16:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Basic_Hints&amp;diff=24900&amp;oldid=prev</id>
		<title>CGHelpdesk at 06:59, 11 November 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Basic_Hints&amp;diff=24900&amp;oldid=prev"/>
		<updated>2013-11-11T06:59:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:59, 11 November 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l93&quot;&gt;Line 93:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 93:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In case we want to use external javascript libraries hosted on external servers (like google), we need to include the library link to quest.onInit.&amp;lt;br/&amp;gt;A simple method of doing so is using jquery&amp;#039;s getScript method ([http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback])&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In case we want to use external javascript libraries hosted on external servers (like google), we need to include the library link to quest.onInit.&amp;lt;br/&amp;gt;A simple method of doing so is using jquery&amp;#039;s getScript method ([http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback])&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-24899:rev-24900:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>CGHelpdesk</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Basic_Hints&amp;diff=24899&amp;oldid=prev</id>
		<title>CGHelpdesk at 06:59, 11 November 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Basic_Hints&amp;diff=24899&amp;oldid=prev"/>
		<updated>2013-11-11T06:59:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:59, 11 November 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l92&quot;&gt;Line 92:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 92:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Include an external script library ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Include an external script library ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In case we want to use external javascript libraries hosted on external servers (like google), we need to include the library link to quest.onInit.&amp;lt;br&amp;gt; A simple method of doing so is using jquery&#039;s getScript method (http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback)&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt; &lt;/del&gt;&#039;&#039;&#039;Example:&#039;&#039;&#039;&amp;lt;br&amp;gt; &amp;lt;source lang=&quot;javascript&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In case we want to use external javascript libraries hosted on external servers (like google), we need to include the library link to quest.onInit.&amp;lt;br&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/&lt;/ins&gt;&amp;gt;A simple method of doing so is using jquery&#039;s getScript method (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback &lt;/ins&gt;http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;Example:&#039;&#039;&#039;&amp;lt;br&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/&lt;/ins&gt;&amp;gt;&amp;lt;source lang=&quot;javascript&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$.getScript(&amp;quot;http://ui.jquery.com/testing/ui/ui.datepicker.js&amp;quot;, function()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$.getScript(&amp;quot;http://ui.jquery.com/testing/ui/ui.datepicker.js&amp;quot;, function()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;       &lt;/del&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;//the library is now ready to use&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;//the library is now ready to use&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Do not include a js library as an attachment in a question&#039;s script, otherwise you will have a problem with resource access when respondents view the questionnaire.&amp;lt;br&amp;gt; Solution for this: if the script is short, copy it and put directly into the question/questionnaire&#039;s script, if it is big, find an external host (ex: google host).&amp;lt;br&amp;gt; If you still wants to go with attachment, then create a new group with observer access to the attachments, add a dummy question in the questionnaire to add the current user to the group automatically, also add anonymous user to the group.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Do not include a js library as an attachment in a question&#039;s script, otherwise you will have a problem with resource access when respondents view the questionnaire.&amp;lt;br&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/&lt;/ins&gt;&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;Solution for this&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;: if the script is short, copy it and put directly into the question/questionnaire&#039;s script, if it is big, find an external host (ex: google host).&amp;lt;br&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/&lt;/ins&gt;&amp;gt;If you still wants to go with attachment, then create a new group with observer access to the attachments, add a dummy question in the questionnaire to add the current user to the group automatically, also add anonymous user to the group.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-24898:rev-24899:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>CGHelpdesk</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Basic_Hints&amp;diff=24898&amp;oldid=prev</id>
		<title>CGHelpdesk at 06:58, 11 November 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Basic_Hints&amp;diff=24898&amp;oldid=prev"/>
		<updated>2013-11-11T06:58:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:58, 11 November 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l100&quot;&gt;Line 100:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 100:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Do not include a js library as an attachment in a question&#039;s script, otherwise you will have a problem with resource access when respondents view the questionnaire.&amp;lt;br&amp;gt; Solution for this: if the script is short, copy it and put directly into the question/questionnaire&#039;s script, if it is big, find an external host (ex: google host).&amp;lt;br&amp;gt; If you still wants to go with attachment, then create a new group with observer access to the attachments, add a dummy question in the questionnaire to add the current user to the group automatically, also add anonymous user to the group.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Do not include a js library as an attachment in a question&#039;s script, otherwise you will have a problem with resource access when respondents view the questionnaire.&amp;lt;br&amp;gt; Solution for this: if the script is short, copy it and put directly into the question/questionnaire&#039;s script, if it is big, find an external host (ex: google host).&amp;lt;br&amp;gt; If you still wants to go with attachment, then create a new group with observer access to the attachments, add a dummy question in the questionnaire to add the current user to the group automatically, also add anonymous user to the group.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Edit stylesheet ===&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The easiest way is to use Firefox with Web Developer Add-on (http://chrispederick.com/work/web-developer)&amp;lt;br&amp;gt; &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Image:Web developer.png]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-23311:rev-24898:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>CGHelpdesk</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Basic_Hints&amp;diff=23311&amp;oldid=prev</id>
		<title>Cg huutrung: Created page with &quot;== Basic Hints  ==  Questionnaire viewer is implemented in a way that you can add javascript to manipulate the way your questions are displayed.   jQuery is already included in t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Basic_Hints&amp;diff=23311&amp;oldid=prev"/>
		<updated>2012-01-05T07:18:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Basic Hints  ==  Questionnaire viewer is implemented in a way that you can add javascript to manipulate the way your questions are displayed.   jQuery is already included in t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Basic Hints  ==&lt;br /&gt;
&lt;br /&gt;
Questionnaire viewer is implemented in a way that you can add javascript to manipulate the way your questions are displayed. &lt;br /&gt;
&lt;br /&gt;
jQuery is already included in the viewer, thanks to&amp;amp;nbsp;what&amp;amp;nbsp;javascript has even more powerful effect! (read more about jquery here:&amp;amp;nbsp;[http://jquery.com/ http://jquery.com/]) &lt;br /&gt;
&lt;br /&gt;
Javascript is a property on both question and questionnaire levels, which means that you can add javascript for each question or for the whole questionnaire. &lt;br /&gt;
&lt;br /&gt;
The most important features are: &lt;br /&gt;
&lt;br /&gt;
*quest: the current question&amp;#039;s object &lt;br /&gt;
*questioncheck: the function called before going Next&lt;br /&gt;
&lt;br /&gt;
=== quest  ===&lt;br /&gt;
&lt;br /&gt;
Some important properties of quest object: &lt;br /&gt;
&lt;br /&gt;
*quest.questions:&amp;amp;nbsp;array of sub questions &lt;br /&gt;
*quest.options: array of answer options&lt;br /&gt;
&lt;br /&gt;
Methods of quest object: &lt;br /&gt;
&lt;br /&gt;
*quest.setQuestions(Array subQuestions): assign an array of question objects to the sub question list of the current question &lt;br /&gt;
*quest.setOptions(Array options): assign an array of options to the answer option list of the current question &lt;br /&gt;
*quest.setAnswer(string value): assign a value to the question &lt;br /&gt;
*quest.getHTML(): returns the HTML which will be rendered to display the question &lt;br /&gt;
*quest.onInit(): called right after loading the question &lt;br /&gt;
*quest.rotateAnswerOptions(startIndex, endIndex, rotateIndex): rotate answer options in a range specified by startIndex and endIndex, the first item in the range will be rotateIndex &lt;br /&gt;
*quest.rotateSubQuestions(startIndex, endIndex, rotateIndex):&amp;amp;nbsp;rotate sub questions in a range specified by startIndex and endIndex, the first item in the range will be rotateIndex &lt;br /&gt;
*quest.randomizeAnswerOptions(randomSeed, startIndex, endIndex):&amp;amp;nbsp;randomize answer options in a range specified by startIndex and endIndex, the order&amp;amp;nbsp;is unique&amp;amp;nbsp;for each randomSeed &lt;br /&gt;
*quest.randomizeSubQuestions(randomSeed, startIndex, endIndex):randomize sub questions in a range specified by startIndex and endIndex, the order is unique for each randomSeed&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== questioncheck()  ===&lt;br /&gt;
&lt;br /&gt;
We need to override this function to get rid of the default question check supported by the questionnaire viewer, it is a must when showing more than one questions in the same page. The function returns true when there is nothing wrong and false otherwise. &lt;br /&gt;
&lt;br /&gt;
There is an object which should be used to display errors: ErrorMessages. &lt;br /&gt;
&lt;br /&gt;
*ErrorMessages.getInstance().clearErrorMessages(): clear all existing error messages &lt;br /&gt;
*ErrorMessages.getInstance().showErrorMessage(msg): show an error message&lt;br /&gt;
&lt;br /&gt;
If you want to extend the questioncheck function with special cases then you should re-create the questioncheck function carefully, because else you will create an endless loop. If you get a stack overflow error from the browser, then your problem should be solved by the following script pattern: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;// Store a reference to the default question check&lt;br /&gt;
var defaultQuestionCheck = questioncheck;&lt;br /&gt;
&lt;br /&gt;
// Implement your own question check routine&lt;br /&gt;
var questioncheck = function()&lt;br /&gt;
{&lt;br /&gt;
   // Call the default question check&lt;br /&gt;
   // If it fails&lt;br /&gt;
   if (!defaultQuestionCheck())&lt;br /&gt;
      // Then return at once with false&lt;br /&gt;
      return false;&lt;br /&gt;
      &lt;br /&gt;
   // Catch exceptions, this is just for precaution&lt;br /&gt;
   try&lt;br /&gt;
   {&lt;br /&gt;
      // Optimistic assumption that everything is OK&lt;br /&gt;
      var valid = true;&lt;br /&gt;
&lt;br /&gt;
      // Do your customized question checks here set variable&lt;br /&gt;
      // valid to false if the question is answered incorrectly&lt;br /&gt;
&lt;br /&gt;
      if (!valid)&lt;br /&gt;
      {&lt;br /&gt;
         // You might want to clear default error messages given&lt;br /&gt;
         ErrorMessages.getInstance().clearErrorMessages();&lt;br /&gt;
&lt;br /&gt;
         // Add your own error message&lt;br /&gt;
         ErrorMessages.getInstance().showErrorMessage(&amp;quot;An error message&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
         // Terminate the question check by returning false&lt;br /&gt;
         return false;&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
   catch(e)&lt;br /&gt;
   {&lt;br /&gt;
      // Inform about the reason for the exception&lt;br /&gt;
      alert(e.message);&lt;br /&gt;
&lt;br /&gt;
      // And return false&lt;br /&gt;
      return false;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   // Everything is OK      &lt;br /&gt;
   return true;&lt;br /&gt;
}&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
== Technical tips ==&lt;br /&gt;
&lt;br /&gt;
=== Include an external script library ===&lt;br /&gt;
&lt;br /&gt;
In case we want to use external javascript libraries hosted on external servers (like google), we need to include the library link to quest.onInit.&amp;lt;br&amp;gt; A simple method of doing so is using jquery&amp;#039;s getScript method (http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback)&amp;lt;br&amp;gt; &amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt; &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
$.getScript(&amp;quot;http://ui.jquery.com/testing/ui/ui.datepicker.js&amp;quot;, function()&lt;br /&gt;
       {&lt;br /&gt;
	//the library is now ready to use&lt;br /&gt;
	}&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Do not include a js library as an attachment in a question&amp;#039;s script, otherwise you will have a problem with resource access when respondents view the questionnaire.&amp;lt;br&amp;gt; Solution for this: if the script is short, copy it and put directly into the question/questionnaire&amp;#039;s script, if it is big, find an external host (ex: google host).&amp;lt;br&amp;gt; If you still wants to go with attachment, then create a new group with observer access to the attachments, add a dummy question in the questionnaire to add the current user to the group automatically, also add anonymous user to the group. &lt;br /&gt;
&lt;br /&gt;
=== Edit stylesheet ===&lt;br /&gt;
&lt;br /&gt;
The easiest way is to use Firefox with Web Developer Add-on (http://chrispederick.com/work/web-developer)&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Web developer.png]]&lt;/div&gt;</summary>
		<author><name>Cg huutrung</name></author>
	</entry>
</feed>