Okay, so I got this project, in which I am trying to just set a checkbox to true or false depending on the button they click. My code is essentially this
However, the checkbox doesn't ever change its appearance. I did some tests, and it says the value of checked is undefined before I call one of these functions. I am attaching checkbox to the correct element, and I have tried setting checked in the load function, however nothing works.
I have also tried starting a new project to see if one project was just acting weird, however in the new project nothing changed either.
Any help?
Code:
var checkbox;
function load()
{
dashcode.setupParts();
checkbox = document.getElementById("checkbox");
}
function deselectGroup1(event)
{ // this function is correctly hooked up to the on click event for a button.
checkbox.checked = false;
}
function selectGroup1(event)
{ // this function is correctly hooked up to the on click event for another button.
checkbox.checked = true;
}
However, the checkbox doesn't ever change its appearance. I did some tests, and it says the value of checked is undefined before I call one of these functions. I am attaching checkbox to the correct element, and I have tried setting checked in the load function, however nothing works.
I have also tried starting a new project to see if one project was just acting weird, however in the new project nothing changed either.
Any help?