parent ID is Toolbar

hi i have two questions about dhtmlxToolbar:
1 how to get parrent id dynamicaly from clicked optionButton?
2 how to setup optionButton tooltip in xml?

Hi,

how to get parrent id dynamicaly from clicked optionButton?

There isn’t such a method. You may specify complex ids for options (for example “parentId_itemId”) and parse the id to get parent id:

var arr = id.split("_");
var parentId = arr[0];

how to setup optionButton tooltip in xml?

option tooltip can be set only by setListOptionToolTip method.

You may try to define userdata tags for select element and then set it as options tooltips:

[code]
Create new text document
New excel document


toolbar.loadXML(url,function(){
toolbar.forEachItem(function(itemId){
if (toolbar.getType(itemId) == “buttonSelect”) {
toolbar.forEachListOption(itemId,function(optionId){
if(toolbar.getUserData(itemId,optionId))
toolbar.setListOptionToolTip(itemId, optionId,this.getUserData(itemId,optionId));
})
}
});
});[/code]