Hi, I'm trying to create a javascript function that will check / uncheck checkboxes associated with a multilevel tree menu. I've uploaded the page in where the menu is created using php.
As you see now, when we click a menu, not all / none of its child menus are getting checked / unchecked. In somd cases, check boxes are not even clickable.
The function as it is now -
------------------------------------------------
function getChildren(id) {
var children = [];
for (var i=1;i <= menuArray.length; i++) {
var parentid = menuArray;
if (parentid == id) {
children.push(i);
children.concat(getChildren(i));
var obj=document.getElementById("veh_"+id);
obj.checked = (obj.checked == true) ? false : true;
}
}
return children;
}
---------------------------------------------------------
Thanks for any help.
Best.
As you see now, when we click a menu, not all / none of its child menus are getting checked / unchecked. In somd cases, check boxes are not even clickable.
The function as it is now -
------------------------------------------------
function getChildren(id) {
var children = [];
for (var i=1;i <= menuArray.length; i++) {
var parentid = menuArray;
if (parentid == id) {
children.push(i);
children.concat(getChildren(i));
var obj=document.getElementById("veh_"+id);
obj.checked = (obj.checked == true) ? false : true;
}
}
return children;
}
---------------------------------------------------------
Thanks for any help.
Best.