Question
Disable Hidden Boxes with Javascript
Hello
I am using the syntax below to hide boxes in a matrix table, however they can still be selected while hidden. How do I disable them as well?
$('QR~QIDx~1~2').up('td').childElements().invoke('hide');
I've tried replacing the word "hide" with "disable", but that doesn't work for multiple cells.
Thanks,
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

Let's say that I also want to hide and disable the following cells: row 1 column 1, row 2 column 2, row 3 column 2, and row 3 column 3.
In the JavaScript, I would build out the following under ".addOnLoad".
<code>
Qualtrics.SurveyEngine.addOnload(function()
{
var cell = "1~1";
jQuery(("#QR~"+this.questionId+"~"+cell).replace(/~/g, "\\\\~")).closest("td").find("*").prop("disabled",true).hide();
var cell = "2~2";
jQuery(("#QR~"+this.questionId+"~"+cell).replace(/~/g, "\\\\~")).closest("td").find("*").prop("disabled",true).hide();
var cell = "3~2";
jQuery(("#QR~"+this.questionId+"~"+cell).replace(/~/g, "\\\\~")).closest("td").find("*").prop("disabled",true).hide();
var cell = "3~3";
jQuery(("#QR~"+this.questionId+"~"+cell).replace(/~/g, "\\\\~")).closest("td").find("*").prop("disabled",true).hide();
});
</code>
What results in the survey view is a cell that is hidden and disabled.
!