This is my code
var historyMenu = new dhtmlXMenuObject(null, “standard”);
historyMenu.setImagePath(“dhtmlxMenu/codebase/imgs/standard/”);
historyMenu.renderAsContextMenu();
historyMenu.addNewChild(historyMenu.topId,0,“rollback”,“Rollback”, false, “rollback.gif”);
but image in menu doesn’t show, it src=“imgs/standardrollback.gif”.
What is wrong?
The menu has two methods to set image path:
- setImagePath - sets path to standard images (which are necessary for setting skin)
- setIconsPath - sets path to the icons
In your case the code can be the following:
var historyMenu = new dhtmlXMenuObject(null, “standard”);
historyMenu.setImagePath(“dhtmlxMenu/codebase/imgs/”);
historyMenu.setIconsPath(“dhtmlxMenu/codebase/imgs/standard/”);
…
Thank you it works