Categories | Question details Back To List | ||||||||
dhtmlxMenu - same file but Got error message under Visual Studio 2005 I am using dhtmlxMenu v.2.0 Standard edition build 81009/81107 <head> <title>test</title> <link rel="stylesheet" type="text/css" href="../dhtmlxSuite/dhtmlxMenu/codebase/skins/dhtmlxmenu_glassy_blue.css"> <link rel='STYLESHEET' type='text/css' href='../dhtmlxSuite/dhtmlxMenu/codebase/style.css'> <script src="../dhtmlxSuite/dhtmlxMenu/codebase/dhtmlxcommon.js"></script> <script src="../dhtmlxSuite/dhtmlxMenu/codebase/dhtmlxmenu.js"></script> <script> var menu; function initMenu() { menu = new dhtmlXMenuObject("menuObj","glassy_blue"); menu.setImagePath("../dhtmlxSuite/dhtmlxMenu/codebase/imgs/"); menu.setIconsPath("../dhtmlxSuite/dhtmlxMenu/codebase/images/"); menu.loadXML("../xml/dhtmlxmenu.xml?etc="+new Date().getTime()); menu.setItemDisabled("m11"); } </script> </head> <body onload="initMenu();"> <div id="menuObj" style="position: absolute; top: 0; right: 0; width: 260px;"> </div> </body> This html file work fine under not Visual Studio 2005 environment If under that environment, when execute to “menu.setItemDisabled("m11");” Visual Studio show error message 'this.itemPull[...].patent' is null or not an object dhtmlxmenu.js : stop at line 23 return (this.itemPull[thi's.idPrefix+id]["parent"]==this.idPrefix+this.topId?"TopLevel":"SubLevelArea") Answer posted by Alex (support) on Jul 27, 2009 01:48 Hello, the operations with items should be executed after the xml (items) is loaded: menu.loadXML("../xml/dhtmlxmenu.xml?etc="+new Date().getTime(),function(){ menu.setItemDisabled("m11"); }); Answer posted by Frank Lin on Jul 27, 2009 03:37 My program is no difference with your answer. This html file work fine under not Visual Studio 2005 environment
Answer posted by Alex (support) on Jul 27, 2009 05:24 The issue was not reproduced locally. Please, provide the complete sample or direct link to the problematic page. Answer posted by Frank Lin on Jul 27, 2009 06:36 <!--conf <html> <script src="../dhtmlxSuite/dhtmlxMenu/codebase/dhtmlxcommon.js"></script> <div id="menuObj" style="position: absolute; top: 0; right: 0; width: 260px;"></div> <script>
</script> </body> Answer posted by Alex (support) on Jul 27, 2009 07:24 Please, try the attached sample. Here menu.setItemDisabled("m11"); is called in the way that has been recommended in the previous reply. Attachments (1)
|