I\'m using the jsTree jQuery plugin with the checkbox theme. Does anyone know how to get the selected values with a form post?
Thank you!
The suggested solution from google groups however didn't work for partially checked nodes, in my case. I had to leave the get_checked out and do the following to get fully selected and partially selected nodes.
$(".sector-tree").find(".jstree-undetermined").each(function(i,element){
checked_ids.push($(element).attr("id"));
if ($(this).find(".jstree-undetermined").length == 0) {
$(this).find(".jstree-checked").each(function(i, element){
checked_ids.push({$(element).attr("id"));
});
}
});
// collect the rest of the checked nodes that exist under checked parents
$(".sector-tree").find(".jstree-checked").each(function(i, element){ //also includes the ones below 'undetermined' parent
var selectedElement = $(element).attr("id");
if ( hasItem(selectedElement, checked_ids ) < 0 ) {
checked_ids.push(selectedElement);
}
});