Have an idea?

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

Grey out checkboxes

Hi!

I have just a simple select question with checkboxes with seven responses plus a a "none of the above" at the end (so eight list members). I'd like to grey out the seven responses if the "none" option is chosen (purely as a visual thing - of course I know I can simply make the None exclusive!). I have really very little experience in javascript, so was wondering if someone can help.

Thanks!
asked Jan 20, 2012 by anonymous

1 Answer

0 votes
Great Idea!

But the thing is if the respondent can change his mind for selection, at that time this grey wont be work, i suppose it should check the options when we select the radio button gets exclusive, and vice versa cases, please try the below code:


<script type="text/javascript">
var a=0;
var b=0;
for(i=0;i<=4;i++)
{
    if(SSI_GetValue("Q7_r1_"+i)==1)
    {
        a=a+1;
    }
}
function SSI_CustomGraphicalCheckbox(GraphicalCheckboxObj, InputObj,blnCheck)
{
    b=0;
   
    if(blnCheck == true)
    {
        SSI_RadioReset("Q7_c1");
        a=a+1;
        b=0;
    }
    else
    {
        a=a-1;
        b=0;
    }
}
function SSI_CustomGraphicalRadiobox(GraphicalRadioboxObj, InputObj)
{
   
    if(InputObj.name == "Q7_c1")
    {
       
        SSI_SetSelect("Q7_r1_1", false);
        SSI_SetSelect("Q7_r1_2", false);
        SSI_SetSelect("Q7_r1_3", false);
        SSI_SetSelect("Q7_r1_4", false);
        a=0;
        b=1;
        //alert(a+","+b);       
    }
}
</script>
answered Feb 2, 2016 by sandeepkapalawai Bronze (1,475 points)
...