Is there a method to read all items of a menu?
The lenght property always is Zero and i can’t use the forEach method:
aMenu.menu.forEach(contextMenu_proc);
And this function
function contextMenu_proc(element, index, array)
{
if(element == opcioContextMenu)
{
aMenu.menu.getItem(element).imageTag.src=’/BUWE/BPPE/common/imatges/iconCheckAll.gif’;
}
else
{
aMenu.menu.getItem(element).imageTag.src=’/BUWE/BPPE/common/imatges/iconUnCheckAll.gif’;
}
}
Thanks for all
There is no built-in iterator, but you can use next code
for (var i=0; i<aMenu.menu.gitems.length; i++){
var id = aMenu.menu.gitems[i].id;
… any custom code here…
}
Oh! Fantastic its just that I want
gitems!
Best Regards
Àlex Corretgé