Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by herry on Sep 17, 2008 00:09
open dhtmlx forum
how to disable menu item

Hi,
i am using free style type menu having dhtmlxmenu_alter.css.the following code i have written

    <script>
        
        var aMenuBar=new dhtmlXMenuBarObject(document.getElementById('altermenu'),'100%',22,"");
        aMenuBar.setGfxPath("Menu/imgs/");
        aMenuBar.loadXML("Menu/_menu.xml");
        aMenuBar.disableSmartPositioning(true);
        aMenuBar.showBar();
        aMenuBar.disableItem(document.getElementById('main_Exam'));
    </script>

i want to disable the menu item Exam having id 'main_exam'.
but it is not performing by this code.
help


Answer posted by Support on Sep 18, 2008 10:35
Try to call disableItem command after xml loading:

aMenuBar.loadXML("Menu/_menu.xml",function(){
aMenuBar.disableItem(document.getElementById('main_Exam'));
});