emmanuellamy
05-11-2003, 02:48 AM
Hi everybody,
I am trying to set the "state" of a checkbox, based on the value of another checkbox.
I tried an approach like this:
var checkbox1=this.getField("checkbox1ID");
var checkbox2=this.getField("checkbox2ID");
if (checkbox1.value==true)
{
checkbox2.value=false;
}
if (checkbox1.value==false)
(
checkbox2.value=true;
)
Indeed, it did not work. I am confused about how to reference the state "checked" or "unchecked" of a checkbox. Is the value of a "checked" checkbox is internally set to true, and the "unchecked" set to false? Answer to that question may help me move forward. Any help is welcome. Anticipated thanks.
Emmanuel
I am trying to set the "state" of a checkbox, based on the value of another checkbox.
I tried an approach like this:
var checkbox1=this.getField("checkbox1ID");
var checkbox2=this.getField("checkbox2ID");
if (checkbox1.value==true)
{
checkbox2.value=false;
}
if (checkbox1.value==false)
(
checkbox2.value=true;
)
Indeed, it did not work. I am confused about how to reference the state "checked" or "unchecked" of a checkbox. Is the value of a "checked" checkbox is internally set to true, and the "unchecked" set to false? Answer to that question may help me move forward. Any help is welcome. Anticipated thanks.
Emmanuel