Okay, so I\'m trying to change a checkbox\'s state programmatically in dashcode. I\'ve tried:
var checkbox = document.getElementById(\"checkbox\");
// I have tr
This question has been around a while. Regardless, the following works for us:
checkbox.childNodes[1].checked = true; checkBox.childNodes[1].checked = false;
As pointed out in a previous answer, the way Dashcode creates these controls you need to get past the div wrapper, which has the actual ID (checkbox in this example) and set the property for the input, which is child node 1.
Looking for the actual 'id' of the input would be problematic as you have no control over what id's are assigned to the node. For example if you have two checkboxes then the first one would have 'input' as the id for child node 1 and the second one 'input1', unless, of source you have used 'input' or 'input1' as an id somewhere in your design already!
There might be another method but I have not found it yet.