Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by XB on Nov 05, 2008 08:01
open dhtmlx forum
Context Menu not loading in dhxFolder

Problem: Trying to initialize a context menu in dhxfolder but when right click, nothing shows up

Code:

var dhxFolderMenu = new dhtmlXMenuObject(null, "standard");
dhxFolderMenu.renderAsContextMenu();
dhxFolderMenu.setOpenMode("web");
dhxFolderMenu.loadXML("../menu.xml");

dhxFolder = dhxLayout_folderSection.cells("b").attachFolders(); // dhxLayout_folderSection already initialized
dhxFolder.enableContextMenu(dhxFolderMenu);

Am I doing anything wrong here?
I read in the documentation when the menu object is null, the enableContextMenu is disabled but it is initialized here,
is there anything I might be missing? (dhtmlxfolders_drag.js is already included)

thanks in advance
Answer posted by Support on Nov 05, 2008 09:20
Problem can be caused by missed skin, please be sure that related skin file for menu is loaded 

<link rel='STYLESHEET' type='text/css' href='dhtmlxMenu/codebase/skins/dhtmlxmenu_dhx_blue.css'>

var dhxFolderMenu = new dhtmlXMenuObject(null, "dhx_blue");