syfodyas
Member
Posts: 11
Registered: 11/16/2005
Member Is Offline
|
| posted on 11/28/2005 at 03:03 PM |
|
|
getSelectedItems()
I've purchased the PRO versino and trying to get all the selected items out of my tree.
I preselect some items by doing this:
['$output',null,{'sl':1, 'hs':'addToSelection', 'tt':'$output'}
addToSelection does nothing in this example
then my function has to return the selected items:
function getSelectedItems() {
var a_found = TREES['tree'].find_item_by_state('2');
for (var i=0; i<a_found.length; i++){
alert("selected item: "+a_found.a_config[0]);
}
alert(" "+i+" items found");
}
when i use find_items_by_state('3') it returns the caption properly, but there seems to be a problem with the selected itesm. Am i doing something
wrong??
|
|
|
syfodyas
Member
Posts: 11
Registered: 11/16/2005
Member Is Offline
|
| posted on 11/28/2005 at 07:59 PM |
|
|
Never mind, i already fixed it
var found = TREES['tree'].find_item_by_state('4');
|
|
|