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!
This I did:
function getSelectedItems()
{
var checked_ids = [];
checkedNodes = $("#MyTree").jstree("get_checked", null, true);
for(var i = 0; i < checkedNodes.length; i++)
{
var id = $(checkedNodes[i].outerHTML)[0].id;
checked_ids.push(id);
}
// Do whatever you want with the checked_ids
}
This will give you an array of all selected node and their sub nodes and leafs; as well as single leafs selected under other nodes.