The attached uses a button click event to toggle the colour of the clickable area in a checkbox.
// form1.page1.subform1.btn::click - (JavaScript, client)
if (form1.page1.subform1.resolveNode("btn.caption.value.#text").value == "Make Red") {
form1.page1.subform1.resolveNode("cb.ui.#checkButton.border.fill.color").value = "255,0,0";
form1.page1.subform1.resolveNode("btn.caption.value.#text").value = "Reset";
}
else {
form1.page1.subform1.resolveNode("cb.ui.#checkButton.border.fill.color").value = "255,255,255";
form1.page1.subform1.resolveNode("btn.caption.value.#text").value = "Make Red";
}
Steve