Userdata in buttonselect items

Hi.
I have a buttonselect in a toolbar with items inside and i need to get the userdata of this items.
The userdata of the items in the toolbar are working fine, the problem is with the items that are inside a buttonselect, which returns a null value.

VALUE

toolbar.getuserdata(“M11”,“K”) returns Null

Thanks

Hi,

select options do not support userdata. However, you can set all userdata to the select item. For example:

VALUE 1 VALUE 2

var k1 = toolbar.getUserData(“M11”,“M11_K”);
var k2 = toolbar.getUserData(“M12”,“M12_K”);

Alexandra, thanks for the answer, but this solution doesn’t resolve the problem.
The toolbar.getuserdata id must be the buttonselect id instead of item id.

Example:
var k1 = toolbar.getUserData(“M1”,“M11_K”);
var k2 = toolbar.getUserData(“M1”,“M12_K”);

Is there a way to get the buttonselect id in the event click?

//Code:
otoolbar.attachEvent(“onClick”,function(id){firetoolbaraction(id)});

function firetoolbaraction(Id)
{
//here i need the buttonselect id instead of item id
if ((otoolbar.getUserData(Id,“url”))!="")
{
alert(otoolbar.getUserData(Id,“url”));
};

Thanks.
};

You may getParentId(optionId) method to get the id of the select button:

function firetoolbaraction(Id) { var url; if(this.getType(id)=="buttonSelectButton"){ var selectId = getParentId(id); url = toolbar.getUserData(selectId,id+"_url"); } else url = otoolbar.getUserData(Id,"url"); if(url) alert(url) }