<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.catglobe.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Phamngocson</id>
	<title>Catglobe Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.catglobe.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Phamngocson"/>
	<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/Special:Contributions/Phamngocson"/>
	<updated>2026-05-06T18:43:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Get_parameters_from_answer_sheet_link&amp;diff=25096</id>
		<title>Get parameters from answer sheet link</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Get_parameters_from_answer_sheet_link&amp;diff=25096"/>
		<updated>2015-05-26T13:18:54Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: Created page with &amp;quot;== Challenge ==  In order to get parameter by js from answer sheet to do some purpose. How can you do that?  This article will guide you to get parameter via javascript (both ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Challenge ==&lt;br /&gt;
&lt;br /&gt;
In order to get parameter by js from answer sheet to do some purpose. How can you do that?&lt;br /&gt;
&lt;br /&gt;
This article will guide you to get parameter via javascript (both old and new viewer)&lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
*Add a question to Questionnaire editor&lt;br /&gt;
*Go to menu Properties -&amp;gt; Question scripts -&amp;gt; Java script tab -&amp;gt; Input script&lt;br /&gt;
*Parameter has to use start with cg_ ex: cg_feedback, cg_type,...&lt;br /&gt;
&lt;br /&gt;
=== Code on the new viewer ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function getQueryVariable(variable) {&lt;br /&gt;
 var query = window.location.search.substring(1);&lt;br /&gt;
 var vars = query.split(&amp;quot;&amp;amp;&amp;quot;);&lt;br /&gt;
 for (var i=0;i&amp;lt;vars.length;i++) {&lt;br /&gt;
 var pair = vars[i].split(&amp;quot;=&amp;quot;);&lt;br /&gt;
 if (pair[0] == variable) {&lt;br /&gt;
 return pair[1];&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
Question.bind(&#039;afterShowQuestion&#039;, function(question, answerSheet, element) {&lt;br /&gt;
 var param = getQueryVariable(&amp;quot;cg_type&amp;quot;);&lt;br /&gt;
 //alert(param);&lt;br /&gt;
 var url = &amp;quot;https://www.google.com.vn/&amp;quot;&lt;br /&gt;
 if(param==&amp;quot;feedback&amp;quot;)document.location = url;&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Code on the old viewer ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function getQueryVariable(variable) {&lt;br /&gt;
 var query = window.location.search.substring(1);&lt;br /&gt;
 var vars = query.split(&amp;quot;&amp;amp;&amp;quot;);&lt;br /&gt;
 for (var i=0;i&amp;lt;vars.length;i++) {&lt;br /&gt;
 var pair = vars[i].split(&amp;quot;=&amp;quot;);&lt;br /&gt;
 if (pair[0] == variable) {&lt;br /&gt;
 return pair[1];&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
quest.onInit = function(){&lt;br /&gt;
 var param = getQueryVariable(&amp;quot;cg_type&amp;quot;);&lt;br /&gt;
 //alert(param);&lt;br /&gt;
 var url = &amp;quot;https://www.google.com.vn/&amp;quot;&lt;br /&gt;
 if(param==&amp;quot;feedback&amp;quot;)document.location = url;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Questionnaire_-_Javascript_Fun_Tips&amp;diff=25095</id>
		<title>Questionnaire - Javascript Fun Tips</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Questionnaire_-_Javascript_Fun_Tips&amp;diff=25095"/>
		<updated>2015-05-26T12:55:27Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;[[Basic Hints|Basic Hints]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show more than one questions in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Add answer options of the close questions to the open questions]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Validate the questions by using the questioncheck() function]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show a text grid and a single question in the same page|Show a text grid question and a single question in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show more than one singe grid in the same page|Show more than one single grid in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show more than one singe question in the same page|Show more than one single question in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show single questions as dropdown lists in their own pages]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Insert a TextGrid question into a SingleGrid Question]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Some special questions on COOP Site]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;[[Showing Answer Option in tab]]&lt;br /&gt;
&lt;br /&gt;
[[Rotate answer options/sub questions]]&lt;br /&gt;
&lt;br /&gt;
[[Randomize answer options/sub questions]]&lt;br /&gt;
&lt;br /&gt;
[[Drag and drop answer option values]]&lt;br /&gt;
&lt;br /&gt;
[[Change Impsys mages]]&lt;br /&gt;
&lt;br /&gt;
[[Add an extra row before a sub question in a grid]]&lt;br /&gt;
&lt;br /&gt;
[[Hide sub question text column in a grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Change stylesheet of an answer option column in a single grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Add an extra column before an answer option column in single grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Both horizontal and vertical single grid]]&lt;br /&gt;
&lt;br /&gt;
[[Disable sub questions in text grids]]&lt;br /&gt;
&lt;br /&gt;
[[Number grid]]&lt;br /&gt;
&lt;br /&gt;
[[Close to URL]]&lt;br /&gt;
&lt;br /&gt;
[[Double columns in text grids]]&lt;br /&gt;
&lt;br /&gt;
[[Count down with invisible counter]]&lt;br /&gt;
&lt;br /&gt;
[[Fold in/out texts in question text]]&lt;br /&gt;
&lt;br /&gt;
[[Force email address]]&lt;br /&gt;
&lt;br /&gt;
[[Force number of characters]]&lt;br /&gt;
&lt;br /&gt;
[[Change text box size]]&lt;br /&gt;
&lt;br /&gt;
[[Set focus on question text in the top]]&lt;br /&gt;
&lt;br /&gt;
[[Maximum text length]]&lt;br /&gt;
&lt;br /&gt;
[[Next button count down]]&lt;br /&gt;
&lt;br /&gt;
[[Mark answer option with keyboard]]&lt;br /&gt;
&lt;br /&gt;
[[Show flash movies on questionnaire viewer|Play a list of movies in questionnaire]] &amp;lt;!--[[Play a commercial and automatically go next when it is over in questionnaire]] : doesnt not work --&amp;gt;[[Show a single question as a dropdown list inside another text grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Hide Next button in n seconds]]&lt;br /&gt;
&lt;br /&gt;
[[Show datepicker in text/text grid questions]]&lt;br /&gt;
&lt;br /&gt;
[[Show column header in text grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Prioritize sub questions in a text grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Align min/max texts in scale grid questions]]&lt;br /&gt;
&lt;br /&gt;
[[Add text before answer option of single question]]&lt;br /&gt;
&lt;br /&gt;
[[Show language selector page]]&lt;br /&gt;
&lt;br /&gt;
[[Reverse single grid between sub questions and answer options]]&lt;br /&gt;
&lt;br /&gt;
[[Script for making a text grid numerical summing to a specific value]]&lt;br /&gt;
&lt;br /&gt;
[[Convert closed question TextBox into TextArea]]&lt;br /&gt;
&lt;br /&gt;
[[Validate email specified as an open text of a single question]]&lt;br /&gt;
&lt;br /&gt;
[[Require only one check for grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Change non-multi option in Multi question to Radio button]]&lt;br /&gt;
&lt;br /&gt;
[[Make whole cell clickable in single and multi grids]]&lt;br /&gt;
&lt;br /&gt;
[[AutoSum numerical text grid]]&lt;br /&gt;
&lt;br /&gt;
[[Show open textbox in a grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Change progress bar images of questionnaire]]&lt;br /&gt;
&lt;br /&gt;
[[Add CKEditor to an Open question]]&lt;br /&gt;
&lt;br /&gt;
[[Upload images in questionnaire]]&lt;br /&gt;
&lt;br /&gt;
[[Check whether values of open parts of a close question are positive numbers or not]]&lt;br /&gt;
&lt;br /&gt;
[[Reverse the position of the subquestion texts with their textboxes in the text-grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Show multi, single question in new style]]&lt;br /&gt;
&lt;br /&gt;
[[Get parameters from answer sheet link]]&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Show_multi,_single_question_in_new_style&amp;diff=24984</id>
		<title>Show multi, single question in new style</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Show_multi,_single_question_in_new_style&amp;diff=24984"/>
		<updated>2014-09-29T08:50:46Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Challenge ==&lt;br /&gt;
&lt;br /&gt;
In order to be more flexible in displaying questions&lt;br /&gt;
&lt;br /&gt;
As a questionnaire creator&lt;br /&gt;
&lt;br /&gt;
I want to show answer option of single/multi question in buttons&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I want to show answer option like this&lt;br /&gt;
&lt;br /&gt;
[[File:Button option.png]]&lt;br /&gt;
&lt;br /&gt;
== Solution ==&lt;br /&gt;
&lt;br /&gt;
*Create a single/multi question&lt;br /&gt;
*Set number of cols you want in question properties&lt;br /&gt;
&lt;br /&gt;
[[File:Col question.png]]&lt;br /&gt;
&lt;br /&gt;
*Add css to question style sheet&lt;br /&gt;
*Add js&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
*Javascript&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
quest.onInit=function(){&lt;br /&gt;
 Single_Multi_Question_New_Style(&amp;quot;Q2_Rest&amp;quot;,[999],&amp;quot;selected&amp;quot;,true);&lt;br /&gt;
}&lt;br /&gt;
function Single_Multi_Question_New_Style(questionLabel, arrNoMulti, classname, isMulti){&lt;br /&gt;
 var obj;&lt;br /&gt;
 $(&amp;quot;.answer_option_cell&amp;quot;).css(&amp;quot;width&amp;quot;,100/$(&amp;quot;.answer_option_cell tr:eq(0) td&amp;quot;).length +&amp;quot;%&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 $(&amp;quot;input[name*=&#039;QUESTION.&amp;quot; + questionLabel + &amp;quot;&#039;]&amp;quot;).each(function(){&lt;br /&gt;
 if($(this).is(&#039;:checked&#039;)){&lt;br /&gt;
 obj = $(&amp;quot;input[name$=&#039;QUESTION.&amp;quot; + questionLabel + &amp;quot;&#039;][value=&#039;&amp;quot; + $(this).val() +&amp;quot;&#039;]&amp;quot;).parent().siblings().children(); &lt;br /&gt;
 obj.addClass(classname);&lt;br /&gt;
 } &lt;br /&gt;
 });&lt;br /&gt;
 &lt;br /&gt;
 $(&amp;quot;a.option_link&amp;quot;).click(function(){&lt;br /&gt;
 if(isMulti){&lt;br /&gt;
 var input_sibling = $(this).parent().siblings().children().val();&lt;br /&gt;
 if($.inArray(Number(input_sibling), arrNoMulti)!=-1){&lt;br /&gt;
 var isChecked = $(this).hasClass(classname);&lt;br /&gt;
 $(&amp;quot;a.option_link&amp;quot;).removeClass(classname);&lt;br /&gt;
 if(!isChecked)$(this).addClass(classname);&lt;br /&gt;
 } &lt;br /&gt;
 else {&lt;br /&gt;
 $(this).toggleClass(classname);&lt;br /&gt;
 $.each(arrNoMulti,function(i,v){&lt;br /&gt;
 obj = $(&amp;quot;input[name$=&#039;QUESTION.&amp;quot; + questionLabel + &amp;quot;&#039;][value=&#039;&amp;quot; + v +&amp;quot;&#039;]&amp;quot;).parent().siblings().children();&lt;br /&gt;
 obj.removeClass(classname);&lt;br /&gt;
 });&lt;br /&gt;
 } &lt;br /&gt;
 }&lt;br /&gt;
 else{&lt;br /&gt;
 $(&amp;quot;a.option_link&amp;quot;).removeClass(classname);&lt;br /&gt;
 $(this).toggleClass(classname);&lt;br /&gt;
 } &lt;br /&gt;
 &lt;br /&gt;
 });&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*CSS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
input[type=&amp;quot;radio&amp;quot;] {&lt;br /&gt;
 display:none;&lt;br /&gt;
}&lt;br /&gt;
input[type=&amp;quot;checkbox&amp;quot;] {&lt;br /&gt;
 display:none;&lt;br /&gt;
}&lt;br /&gt;
a.option_link{&lt;br /&gt;
 -moz-box-shadow:inset 0px 1px 0px 0px #ffffff;&lt;br /&gt;
 -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;&lt;br /&gt;
 box-shadow:inset 0px 1px 0px 0px #ffffff;&lt;br /&gt;
 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) );&lt;br /&gt;
 background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% );&lt;br /&gt;
 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=&#039;#f9f9f9&#039;, endColorstr=&#039;#e9e9e9&#039;);&lt;br /&gt;
 background-color:#f9f9f9;&lt;br /&gt;
 -webkit-border-top-left-radius:4px;&lt;br /&gt;
 -moz-border-radius-topleft:4px;&lt;br /&gt;
 border-top-left-radius:4px;&lt;br /&gt;
 -webkit-border-top-right-radius:4px;&lt;br /&gt;
 -moz-border-radius-topright:4px;&lt;br /&gt;
 border-top-right-radius:4px;&lt;br /&gt;
 -webkit-border-bottom-right-radius:4px;&lt;br /&gt;
 -moz-border-radius-bottomright:4px;&lt;br /&gt;
 border-bottom-right-radius:4px;&lt;br /&gt;
 -webkit-border-bottom-left-radius:4px;&lt;br /&gt;
 -moz-border-radius-bottomleft:4px;&lt;br /&gt;
 border-bottom-left-radius:4px;&lt;br /&gt;
 text-indent:0;&lt;br /&gt;
 border:1px solid #dcdcdc;&lt;br /&gt;
 display:inline-block;&lt;br /&gt;
 color:#000000!important;&lt;br /&gt;
 font-family:Arial;&lt;br /&gt;
 font-size:15px;&lt;br /&gt;
 font-weight:normal;&lt;br /&gt;
 font-style:normal;&lt;br /&gt;
 height: 30px;&lt;br /&gt;
 line-height: 20px;&lt;br /&gt;
 padding-top: 10px;&lt;br /&gt;
 width:100%;&lt;br /&gt;
 text-decoration:none;&lt;br /&gt;
 text-align:center!important;&lt;br /&gt;
 text-shadow:1px 1px 0px #ffffff;&lt;br /&gt;
 margin-top:2px;&lt;br /&gt;
}&lt;br /&gt;
a.option_link:hover{&lt;br /&gt;
 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9) );&lt;br /&gt;
 background:-moz-linear-gradient( center top, #e9e9e9 5%, #f9f9f9 100% );&lt;br /&gt;
 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=&#039;#e9e9e9&#039;, endColorstr=&#039;#f9f9f9&#039;);&lt;br /&gt;
 background-color:#e9e9e9;&lt;br /&gt;
}&lt;br /&gt;
a.selected{&lt;br /&gt;
 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #175691), color-stop(1, #003e76) )!important;&lt;br /&gt;
 background: -moz-linear-gradient(center top , #175691 5%, #003e76 100%) repeat scroll 0 0 rgba(0, 0, 0, 0) !important;&lt;br /&gt;
 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=&#039;#175691&#039;, endColorstr=&#039;#003e76&#039;)!important;&lt;br /&gt;
 border-color: #175691;&lt;br /&gt;
 background-color:#175691!important;&lt;br /&gt;
 box-shadow: none;&lt;br /&gt;
 color: #fff !important;&lt;br /&gt;
 text-shadow: none;&lt;br /&gt;
}&lt;br /&gt;
.answer_option_cell td {&lt;br /&gt;
 text-align: left;&lt;br /&gt;
 vertical-align: middle;&lt;br /&gt;
 width: 100%;&lt;br /&gt;
}&lt;br /&gt;
.answer_option_cell td:first-child {&lt;br /&gt;
 text-align: left;&lt;br /&gt;
 vertical-align: middle;&lt;br /&gt;
 width: auto;&lt;br /&gt;
}&lt;br /&gt;
.answer_option_cell td:first {&lt;br /&gt;
 text-align: left;&lt;br /&gt;
 vertical-align: middle;&lt;br /&gt;
 width: auto;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Show_multi,_single_question_in_new_style&amp;diff=24983</id>
		<title>Show multi, single question in new style</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Show_multi,_single_question_in_new_style&amp;diff=24983"/>
		<updated>2014-09-29T08:48:17Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Challenge ==&lt;br /&gt;
&lt;br /&gt;
In order to be more flexible in displaying questions&lt;br /&gt;
&lt;br /&gt;
As a questionnaire creator&lt;br /&gt;
&lt;br /&gt;
I want to show answer option of single/multi question in buttons&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I want to show answer option like this&lt;br /&gt;
&lt;br /&gt;
[[File:Button option.png]]&lt;br /&gt;
&lt;br /&gt;
== Solution ==&lt;br /&gt;
&lt;br /&gt;
*Create a single/multi question&lt;br /&gt;
*Set number of cols you want in question properties&lt;br /&gt;
&lt;br /&gt;
[[File:Col question.png]]&lt;br /&gt;
&lt;br /&gt;
*Add css to question style sheet&lt;br /&gt;
*Add js&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
quest.onInit = function()&lt;br /&gt;
{&lt;br /&gt;
 this.initializeLeftList();&lt;br /&gt;
 &lt;br /&gt;
 //add Remove link after text boxes&lt;br /&gt;
 $(&amp;quot;input:text&amp;quot;).each(&lt;br /&gt;
 function(i)&lt;br /&gt;
 {&lt;br /&gt;
 $(this).parent().after(&lt;br /&gt;
 $(&amp;quot;&amp;lt;td&amp;gt;&amp;quot;)&lt;br /&gt;
 .append($(&amp;quot;&amp;lt;a href=\&amp;quot;javascript:quest.clearAnswer(&amp;quot;+i+&amp;quot;);\&amp;quot;&amp;gt;Remove&amp;lt;/a&amp;gt;&amp;quot;))&lt;br /&gt;
 .addClass(&amp;quot;grid_subquestion_text grid_subquestion_odd&amp;quot;)&lt;br /&gt;
 );&lt;br /&gt;
 }&lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 //configure the drag move&lt;br /&gt;
 $(&amp;quot;.draggable_text&amp;quot;).draggable&lt;br /&gt;
 (&lt;br /&gt;
 {&lt;br /&gt;
 mouse: &amp;quot;pointer&amp;quot;,&lt;br /&gt;
 helper: &#039;clone&#039;&lt;br /&gt;
 }&lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 //make the textboxes droppable and not editable &lt;br /&gt;
 $(&amp;quot;input:text&amp;quot;).each(&lt;br /&gt;
 function(i)&lt;br /&gt;
 {&lt;br /&gt;
 $(this).addClass(&amp;quot;droppable_cell&amp;quot;);&lt;br /&gt;
 $(this)[0].contentEditable = false;&lt;br /&gt;
 $(this).width(&amp;quot;300px&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
 //drop function&lt;br /&gt;
 $(&amp;quot;.droppable_cell&amp;quot;).droppable&lt;br /&gt;
 (&lt;br /&gt;
 {&lt;br /&gt;
 accept: &amp;quot;.draggable_text&amp;quot;,&lt;br /&gt;
 activeClass: &#039;droppable-active&#039;,&lt;br /&gt;
 hoverClass: &#039;droppable-hover&#039;,&lt;br /&gt;
 drop: function(ev, ui) &lt;br /&gt;
 { &lt;br /&gt;
 var currentValue = $(this).val();&lt;br /&gt;
 var newValue = ui.draggable.text();&lt;br /&gt;
 if (currentValue != &amp;quot;&amp;quot; &amp;amp;&amp;amp; currentValue != newValue)&lt;br /&gt;
 {&lt;br /&gt;
 quest.showProduct(currentValue); &lt;br /&gt;
 }&lt;br /&gt;
 $(this).val(ui.draggable.text()); &lt;br /&gt;
 ui.draggable._hide(&amp;quot;fast&amp;quot;); &lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
 ); &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
quest.initializeLeftList = function()&lt;br /&gt;
{&lt;br /&gt;
 var n = this.questions.length;&lt;br /&gt;
 var answers = this.getAnswers();&lt;br /&gt;
 &lt;br /&gt;
 var products = new Array();&lt;br /&gt;
 products[0] = &amp;quot;{{Brands[0]}}&amp;quot;;&lt;br /&gt;
 products[1] = &amp;quot;{{Brands[1]}}&amp;quot;;&lt;br /&gt;
 products[2] = &amp;quot;{{Brands[2]}}&amp;quot;;&lt;br /&gt;
 products[3] = &amp;quot;{{Brands[3]}}&amp;quot;;&lt;br /&gt;
 products[4] = &amp;quot;{{Brands[4]}}&amp;quot;; &lt;br /&gt;
 &lt;br /&gt;
 //add a product cell before the sub question text cell&lt;br /&gt;
 &lt;br /&gt;
 for(var i=0; i&amp;lt;n; i++)&lt;br /&gt;
 { &lt;br /&gt;
 var v = products[i];&lt;br /&gt;
 $(&amp;quot;#grid_subquestion_text_&amp;quot; + (i+1))&lt;br /&gt;
 .before(&lt;br /&gt;
 $(&amp;quot;&amp;lt;td&amp;gt;&amp;quot;).append(&lt;br /&gt;
 $(&amp;quot;&amp;lt;div&amp;gt;&amp;quot;) &lt;br /&gt;
 .append(&lt;br /&gt;
 $(&amp;quot;&amp;lt;p&amp;gt;&amp;quot;).text(v)&lt;br /&gt;
 .addClass(&amp;quot;draggable_text&amp;quot;)&lt;br /&gt;
 .css(&amp;quot;mouse&amp;quot;, &amp;quot;pointer&amp;quot;)&lt;br /&gt;
 ) &lt;br /&gt;
 )&lt;br /&gt;
 .width(&amp;quot;200px&amp;quot;)&lt;br /&gt;
 ) &lt;br /&gt;
 .width(&amp;quot;10px&amp;quot;); &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 $(&amp;quot;#grid_subquestion_text_1&amp;quot;)&lt;br /&gt;
 .before(&lt;br /&gt;
 $(&amp;quot;&amp;lt;td rowspan=\&amp;quot;&amp;quot;+(n + 1)+&amp;quot;\&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;quot;)&lt;br /&gt;
 .addClass(&amp;quot;grid_space_cell&amp;quot;)&lt;br /&gt;
 .width(&amp;quot;200px&amp;quot;)&lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 $(&amp;quot;.draggable_text&amp;quot;).each(&lt;br /&gt;
 function(i)&lt;br /&gt;
 {&lt;br /&gt;
 if (answers.exists($(this).text()))&lt;br /&gt;
 $(this)._hide(&amp;quot;fast&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 ); &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//get list of answered value&lt;br /&gt;
quest.getAnswers = function()&lt;br /&gt;
{&lt;br /&gt;
 var a = new Array();&lt;br /&gt;
 a[0] = &amp;quot;{{Q7[0]}}&amp;quot;;&lt;br /&gt;
 a[1] = &amp;quot;{{Q7[1]}}&amp;quot;;&lt;br /&gt;
 a[2] = &amp;quot;{{Q7[2]}}&amp;quot;;&lt;br /&gt;
 a[3] = &amp;quot;{{Q7[3]}}&amp;quot;;&lt;br /&gt;
 a[4] = &amp;quot;{{Q7[4]}}&amp;quot;; &lt;br /&gt;
 return a; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//check if a value exists in an array&lt;br /&gt;
Array.prototype.exists = function(value)&lt;br /&gt;
{&lt;br /&gt;
 for(var i=0; i&amp;lt;this.length; i++)&lt;br /&gt;
 {&lt;br /&gt;
 if (this[i] == value)&lt;br /&gt;
 return true;&lt;br /&gt;
 }&lt;br /&gt;
 return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//show a product in the left list&lt;br /&gt;
quest.showProduct = function(value)&lt;br /&gt;
{&lt;br /&gt;
 $(&amp;quot;.draggable_text&amp;quot;).each(&lt;br /&gt;
 function(i)&lt;br /&gt;
 {&lt;br /&gt;
 if ($(this).text() == value)&lt;br /&gt;
 $(this).show();&lt;br /&gt;
 }&lt;br /&gt;
 );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//remove a product from the right list and put back in the left list&lt;br /&gt;
quest.clearAnswer = function(index)&lt;br /&gt;
{&lt;br /&gt;
 var input = $(&amp;quot;input:text&amp;quot;)[index];&lt;br /&gt;
 var value = input.value;&lt;br /&gt;
 if (value != &amp;quot;&amp;quot;)&lt;br /&gt;
 {&lt;br /&gt;
 this.showProduct(value);&lt;br /&gt;
 input.value = &amp;quot;&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Source ==&lt;br /&gt;
&lt;br /&gt;
Questionnaire Resource Id on cg.catglobe.com site: 164079 (Question: Q4_Drag_and_drop_answer_option_values)&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=File:Col_question.png&amp;diff=24982</id>
		<title>File:Col question.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=File:Col_question.png&amp;diff=24982"/>
		<updated>2014-09-29T08:47:02Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=File:Button_option.png&amp;diff=24981</id>
		<title>File:Button option.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=File:Button_option.png&amp;diff=24981"/>
		<updated>2014-09-29T08:42:04Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Show_multi,_single_question_in_new_style&amp;diff=24980</id>
		<title>Show multi, single question in new style</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Show_multi,_single_question_in_new_style&amp;diff=24980"/>
		<updated>2014-09-29T08:37:32Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: Created page with &amp;quot;Test&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Test&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Questionnaire_-_Javascript_Fun_Tips&amp;diff=24979</id>
		<title>Questionnaire - Javascript Fun Tips</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Questionnaire_-_Javascript_Fun_Tips&amp;diff=24979"/>
		<updated>2014-09-29T08:37:02Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;[[Basic Hints|Basic Hints]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show more than one questions in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Add answer options of the close questions to the open questions]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Validate the questions by using the questioncheck() function]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show a text grid and a single question in the same page|Show a text grid question and a single question in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show more than one singe grid in the same page|Show more than one single grid in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show more than one singe question in the same page|Show more than one single question in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show single questions as dropdown lists in their own pages]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Insert a TextGrid question into a SingleGrid Question]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Some special questions on COOP Site]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;[[Showing Answer Option in tab]]&lt;br /&gt;
&lt;br /&gt;
[[Rotate answer options/sub questions]]&lt;br /&gt;
&lt;br /&gt;
[[Randomize answer options/sub questions]]&lt;br /&gt;
&lt;br /&gt;
[[Drag and drop answer option values]]&lt;br /&gt;
&lt;br /&gt;
[[Change Impsys mages]]&lt;br /&gt;
&lt;br /&gt;
[[Add an extra row before a sub question in a grid]]&lt;br /&gt;
&lt;br /&gt;
[[Hide sub question text column in a grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Change stylesheet of an answer option column in a single grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Add an extra column before an answer option column in single grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Both horizontal and vertical single grid]]&lt;br /&gt;
&lt;br /&gt;
[[Disable sub questions in text grids]]&lt;br /&gt;
&lt;br /&gt;
[[Number grid]]&lt;br /&gt;
&lt;br /&gt;
[[Close to URL]]&lt;br /&gt;
&lt;br /&gt;
[[Double columns in text grids]]&lt;br /&gt;
&lt;br /&gt;
[[Count down with invisible counter]]&lt;br /&gt;
&lt;br /&gt;
[[Fold in/out texts in question text]]&lt;br /&gt;
&lt;br /&gt;
[[Force email address]]&lt;br /&gt;
&lt;br /&gt;
[[Force number of characters]]&lt;br /&gt;
&lt;br /&gt;
[[Change text box size]]&lt;br /&gt;
&lt;br /&gt;
[[Set focus on question text in the top]]&lt;br /&gt;
&lt;br /&gt;
[[Maximum text length]]&lt;br /&gt;
&lt;br /&gt;
[[Next button count down]]&lt;br /&gt;
&lt;br /&gt;
[[Mark answer option with keyboard]]&lt;br /&gt;
&lt;br /&gt;
[[Show flash movies on questionnaire viewer|Play a list of movies in questionnaire]] &amp;lt;!--[[Play a commercial and automatically go next when it is over in questionnaire]] : doesnt not work --&amp;gt;[[Show a single question as a dropdown list inside another text grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Hide Next button in n seconds]]&lt;br /&gt;
&lt;br /&gt;
[[Show datepicker in text/text grid questions]]&lt;br /&gt;
&lt;br /&gt;
[[Show column header in text grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Prioritize sub questions in a text grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Align min/max texts in scale grid questions]]&lt;br /&gt;
&lt;br /&gt;
[[Add text before answer option of single question]]&lt;br /&gt;
&lt;br /&gt;
[[Show language selector page]]&lt;br /&gt;
&lt;br /&gt;
[[Reverse single grid between sub questions and answer options]]&lt;br /&gt;
&lt;br /&gt;
[[Script for making a text grid numerical summing to a specific value]]&lt;br /&gt;
&lt;br /&gt;
[[Convert closed question TextBox into TextArea]]&lt;br /&gt;
&lt;br /&gt;
[[Validate email specified as an open text of a single question]]&lt;br /&gt;
&lt;br /&gt;
[[Require only one check for grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Change non-multi option in Multi question to Radio button]]&lt;br /&gt;
&lt;br /&gt;
[[Make whole cell clickable in single and multi grids]]&lt;br /&gt;
&lt;br /&gt;
[[AutoSum numerical text grid]]&lt;br /&gt;
&lt;br /&gt;
[[Show open textbox in a grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Change progress bar images of questionnaire]]&lt;br /&gt;
&lt;br /&gt;
[[Add CKEditor to an Open question]]&lt;br /&gt;
&lt;br /&gt;
[[Upload images in questionnaire]]&lt;br /&gt;
&lt;br /&gt;
[[Check whether values of open parts of a close question are positive numbers or not]]&lt;br /&gt;
&lt;br /&gt;
[[Reverse the position of the subquestion texts with their textboxes in the text-grid question]] &lt;br /&gt;
&lt;br /&gt;
[[Show multi, single question in new style]]&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Questionnaire_-_Javascript_Fun_Tips&amp;diff=24978</id>
		<title>Questionnaire - Javascript Fun Tips</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Questionnaire_-_Javascript_Fun_Tips&amp;diff=24978"/>
		<updated>2014-09-29T08:36:31Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;[[Basic Hints|Basic Hints]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show more than one questions in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Add answer options of the close questions to the open questions]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Validate the questions by using the questioncheck() function]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show a text grid and a single question in the same page|Show a text grid question and a single question in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show more than one singe grid in the same page|Show more than one single grid in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show more than one singe question in the same page|Show more than one single question in the same page]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Show single questions as dropdown lists in their own pages]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Insert a TextGrid question into a SingleGrid Question]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Some special questions on COOP Site]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;[[Showing Answer Option in tab]]&lt;br /&gt;
&lt;br /&gt;
[[Rotate answer options/sub questions]]&lt;br /&gt;
&lt;br /&gt;
[[Randomize answer options/sub questions]]&lt;br /&gt;
&lt;br /&gt;
[[Drag and drop answer option values]]&lt;br /&gt;
&lt;br /&gt;
[[Change Impsys mages]]&lt;br /&gt;
&lt;br /&gt;
[[Add an extra row before a sub question in a grid]]&lt;br /&gt;
&lt;br /&gt;
[[Hide sub question text column in a grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Change stylesheet of an answer option column in a single grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Add an extra column before an answer option column in single grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Both horizontal and vertical single grid]]&lt;br /&gt;
&lt;br /&gt;
[[Disable sub questions in text grids]]&lt;br /&gt;
&lt;br /&gt;
[[Number grid]]&lt;br /&gt;
&lt;br /&gt;
[[Close to URL]]&lt;br /&gt;
&lt;br /&gt;
[[Double columns in text grids]]&lt;br /&gt;
&lt;br /&gt;
[[Count down with invisible counter]]&lt;br /&gt;
&lt;br /&gt;
[[Fold in/out texts in question text]]&lt;br /&gt;
&lt;br /&gt;
[[Force email address]]&lt;br /&gt;
&lt;br /&gt;
[[Force number of characters]]&lt;br /&gt;
&lt;br /&gt;
[[Change text box size]]&lt;br /&gt;
&lt;br /&gt;
[[Set focus on question text in the top]]&lt;br /&gt;
&lt;br /&gt;
[[Maximum text length]]&lt;br /&gt;
&lt;br /&gt;
[[Next button count down]]&lt;br /&gt;
&lt;br /&gt;
[[Mark answer option with keyboard]]&lt;br /&gt;
&lt;br /&gt;
[[Show flash movies on questionnaire viewer|Play a list of movies in questionnaire]] &amp;lt;!--[[Play a commercial and automatically go next when it is over in questionnaire]] : doesnt not work --&amp;gt;[[Show a single question as a dropdown list inside another text grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Hide Next button in n seconds]]&lt;br /&gt;
&lt;br /&gt;
[[Show datepicker in text/text grid questions]]&lt;br /&gt;
&lt;br /&gt;
[[Show column header in text grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Prioritize sub questions in a text grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Align min/max texts in scale grid questions]]&lt;br /&gt;
&lt;br /&gt;
[[Add text before answer option of single question]]&lt;br /&gt;
&lt;br /&gt;
[[Show language selector page]]&lt;br /&gt;
&lt;br /&gt;
[[Reverse single grid between sub questions and answer options]]&lt;br /&gt;
&lt;br /&gt;
[[Script for making a text grid numerical summing to a specific value]]&lt;br /&gt;
&lt;br /&gt;
[[Convert closed question TextBox into TextArea]]&lt;br /&gt;
&lt;br /&gt;
[[Validate email specified as an open text of a single question]]&lt;br /&gt;
&lt;br /&gt;
[[Require only one check for grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Change non-multi option in Multi question to Radio button]]&lt;br /&gt;
&lt;br /&gt;
[[Make whole cell clickable in single and multi grids]]&lt;br /&gt;
&lt;br /&gt;
[[AutoSum numerical text grid]]&lt;br /&gt;
&lt;br /&gt;
[[Show open textbox in a grid question]]&lt;br /&gt;
&lt;br /&gt;
[[Change progress bar images of questionnaire]]&lt;br /&gt;
&lt;br /&gt;
[[Add CKEditor to an Open question]]&lt;br /&gt;
&lt;br /&gt;
[[Upload images in questionnaire]]&lt;br /&gt;
&lt;br /&gt;
[[Check whether values of open parts of a close question are positive numbers or not]]&lt;br /&gt;
&lt;br /&gt;
[[Reverse the position of the subquestion texts with their textboxes in the text-grid question]]&lt;br /&gt;
[[Show multi, single question in new style]]&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Talk:Questionnaire_-_Javascript_Fun_Tips&amp;diff=24977</id>
		<title>Talk:Questionnaire - Javascript Fun Tips</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Talk:Questionnaire_-_Javascript_Fun_Tips&amp;diff=24977"/>
		<updated>2014-09-29T08:34:40Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: Created page with &amp;quot;Test&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Test&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=File:DashBoardOnloadSon.png&amp;diff=24535</id>
		<title>File:DashBoardOnloadSon.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=File:DashBoardOnloadSon.png&amp;diff=24535"/>
		<updated>2013-05-21T04:35:05Z</updated>

		<summary type="html">&lt;p&gt;Phamngocson: uploaded a new version of &amp;amp;quot;File:DashBoardOnloadSon.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Phamngocson</name></author>
	</entry>
</feed>