Welcome Guest Search | Active Topics | Sign In | Register

problem using setDisabled method Options
Joan Darling
Posted: Monday, January 23, 2012 5:12:31 PM
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;
                }
            }
        }
Joan Darling
Posted: Monday, January 23, 2012 5:19:56 PM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
I found the problem, it is setDisabled(disabled).

Thanks,


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.