Page 1 of 1

Setting a check box to checked or unchecked in java script

Posted: Mon Sep 06, 2010 9:43 am
by nascar88
I want to either check or uncheck a check box using a client side java script. When the user clicks on one check box I want to check another check box on the screen using java script. I am having trouble determining what property needs to be set on the check box.

Re: Setting a check box to checked or unchecked in java script

Posted: Tue Sep 07, 2010 10:49 am
by Alex
The syntax is as follows:
getObj("mycheckbox").checked = true;

Where mycheckbox is the id (case-sensitive) of the checkbox.