Rank: Advanced Member Groups: Member
Joined: 3/9/2010 Posts: 119
|
When I use this function it identifies the correct menu item but when i use setDisabled it affects the next menu item not the identified menu item. Am I doing something wrong?
Code: JavaScript
function ucm(clientid, menuitem_text, disable) {
var menu = eo_GetObject(clientid);
var topGroup = menu.getTopGroup();
var count = topGroup.getItemCount();
for (x = 0; x < count; x++) {
var item = topGroup.getItemByIndex(x);
var item_text = item.getText();
if (item_text == menuitem_text) {
item.setDisabled = disable;
break;
}
}
}
|
Rank: Advanced Member Groups: Member
Joined: 3/9/2010 Posts: 119
|
I found the problem, it is setDisabled(disabled).
Thanks,
|