I have a couple of checkboxes in a form, when a user checks the admin access box, the other two boxes ALoc and ELoc should be checked automatically.
The onload javascript event is not working. the code is append below.
Would appreciate it very much for any help to solve it.
Thanks
Code:
var ctrlAdminAccess = Runner.getControl(pageid, 'adminAccess');
var crtlALoc = Runner.getControl(pageid, 'ALoc');
var ctrlELoc = Runner.getControl(pageid, 'ELoc');
ctrlAdminAccess.on('click', function(e) {
if (this.getValue() == "on") {
ctrlALoc.setValue("on");
ctrlELoc.setvalue("on");
alert('OK it is on');
} else {
ctrlALoc.setValue("");
ctrlELoc.setValue("");
}
});