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
Dashboard Widgets just run on WebKit technologies, so code valid for Safari should also be valid in Dashcode. Either of the following should work:
checkbox.checked = true;
checkbox.setAttribute("checked", "true");
The fact that they are not working indicates there is a problem elsewhere in your code. I would check the line
var checkbox = document.getElementById("checkbox");
Correctly assigns an element to the checkbox
variable. Also, check the id of your "checkbox" element is valid and correct (not a duplicate, doesn't have a typo, etc).