Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

To create Highlighting Question

Hi, guys, hope you are doing well.

Currently using SSI Web, version  8.4.8

There is need to create highlighting question, where the text will be shown for respondents, so they choose some words or phrases from this given text.

In the end I must see in SPSS database, which words or phrases were chosen.

I wonder how to realise it.

Thanks a lot for your attention so far.

asked Aug 8 by aissabek (120 points)
Click on this link ...


This is a text hi-lighting question you can download from the Question Library that Zachary Anderson has so neatly put together.

I'm not sure you can use this in v8.4.8? You can certainly use it in Lighthouse Studio v9.

I would double check it's range of use with Sawtooth Software directly at support@sawtoothsoftware.com.

1 Answer

0 votes
hello Ainur,

i suppose you are looking for click and highlight solution (i.e, for example showing a profile to the respondent and asking him to select the text / area which positively influence them or negatively influence them. We will be storing his responses in the back end, based on number of clicks hit by the respondent)

positive influence : 1 click
negative influence : 2 clicks
undo selections : 3 clicks  

we can create this in a free format question.

1) create the number of hidden variables that you need
2) declare them
ex : <tr >
        <td colspan="2" id="a1" class="col">xxxxxxxxxxxxxxxxxxx<input name="[% QuestionName() %]_a1" id="[% QuestionName() %]_a1" type="hidden""></td>

3) we need to place the following CSS & script codes

<style type="text/css">
.tborder, .tborder td
    border-color: #6A6A6A;
    border-width: 2px;
    border-style: solid;
.no_outer_border {
    border-collapse: collapse;
    border-style: hidden;

table.no_outer_border td, table.no_outer_border th {
    border: 2px solid #6A6A6A;
    background-color: red;
    color: white;
    background-color: lightgreen;

<script type="text/javascript">
var col="";
var cls_call;
var xp=0;

function Reset()
function myFunction(id)
    xp=$("#[% QuestionName() %]_"+id).val();
    SSI_SetSelect("[% QuestionName() %]_ch_1",false);
        if(cls_call) { $("."+id).addClass("green");    }
        $("#[% QuestionName() %]_"+id).val(1);
    else if(xp==1)
        if(cls_call) { $("."+id).addClass("red");    }
        $("#[% QuestionName() %]_"+id).val(2);
    else if(xp==2)
        $("#[% QuestionName() %]_"+id).val(0);

4) footer code:

<script type="text/javascript">
/*Code to Reset the highlighted text when check box is checked*/
/*function SSI_CustomGraphicalCheckbox(GraphicalCheckboxObj, InputObj, blnCheck)
    if(blnCheck == true)
var count=0;
    if(this.id) { myFunction(this.id);}
        regExp = /\sa[0-9]+[\s]*/;            // to match ' a1' or ' a1 ' in class="col a1" or "col a1 lft"

5) Validation code:

var i,c=0;
if(c==0 && count==0 && SSI_GetValue("[% QuestionName() %]_ch_1")==0)
        strErrorMessage=" ";
        $("#[% QuestionName() %]_div").removeClass("error_quest_highlight");
        var msg = 'You indicated that nothing in the profile influences you. Please click here to confirm and proceed to the next question.';
        var div = $("<div>" + msg + "</div>");
        $("#[% QuestionName() %]_div").unbind("click");
            width: 500,
            modal: true,
            draggable: false,
            closeOnEscape: false,
            resizable: false,
               title: "Confirm",
            buttons: [
                            text: "OK",
                            click: function ()

answered Aug 24 by Saritha potu Bronze (500 points)