Categories | Question details Back To List | ||
DHTMLX Grid : Context Menu not showing in Internet Explorer(IE) 6 and 7. Hi there, I am getting problem while showing context menu for Grid in Internet Explorer 6 and 7. Following is the code that we have written. // Context Menu Creation : S var aMenu=new dhtmlXContextMenuObject('120',0,Gpath+"/js/dhtmlx/dhtmlxMenu/codebase/imgs/"); aMenu.menu.loadXML(Gpath+"/xml/context/classDetails.xml"); // This xml file we use to show context menu on right click. aMenu.setContextMenuHandler(onButtonClick); aMenu.setContextZone("treeBox",1); // Context Menu Creation : E mygrid = new dhtmlXGridObject('mygrid_showclassdetails'); mygrid.setImagePath(Gpath+"/js/dhtmlx/dhtmlxGrid/codebase/imgs/"); mygrid.setHeader("ShareClass,CUSIP,Class Inception Date,Class Number,Status,shareclassid"); mygrid.setInitWidthsP("30,10,10,10,40,0"); mygrid.setColAlign("left,left,left,left,left,left"); mygrid.setSkin("light"); mygrid.setColTypes("ro,ed,dhxCalendarA,ed,co,ro"); mygrid.setColSorting("str,str,date,str,str,str"); mygrid.enableTooltips("false,false,false,false,false,false"); mygrid.enableContextMenu(aMenu); // We have to use this function to enable context menu on right click. mygrid.getCombo(4).put("1","Active"); mygrid.getCombo(4).put("2","Inactive"); mygrid.preventIECaching(); mygrid.enableRowsHover(true,'grid_hover'); mygrid.enableResizing("false,false,false,false,false,false"); mygrid.enableAutoHeight(true); mygrid.enableAutoWidth(true); mygrid.objBox.style.overflowX="hidden"; mygrid.objBox.style.overflowY="hidden"; mygrid.setColumnHidden(5,true); mygrid.init(); mygrid.loadXML(Gpath+"/fundClassDetails.action?shareclass="+shareclass+"&cusip="+cusip+"&classinceptiondate="+classinceptiondate+"&classnumber="+classnumber+"&status="+status); Answer posted by Support on Jul 14, 2008 04:08 The code is correct , and has not any visible problems - the same code works correctly in case of local samples aMenu.setContextMenuHandler(onButtonClick); aMenu.setContextZone("treeBox",1); Plese be sure that both objects ( onButtonClick functiona, and treeBox node ) exists on moment of function call If problem still occurs for you - please provide any kind of sample, where issue can be reconstructed ( you can send it directly to support@dhtmlx.com ) Answer posted by Tejas Shah on Jul 15, 2008 22:14 I sm still not able to get the context menu especially in IE 6. I have included following files in PARENT JSP. Are there some files missing or some order is wrong ???? <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/dhtmlxmenu.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/context.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/common/dhtmlxmenu_alter.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/common/dhtmlxmenu_xp.css"/> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/dhtmlxcommon.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/dhtmlxprotobar.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/dhtmlxmenubar.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/dhtmlxmenubar_cp.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_link.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_nxml.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_dhxcalendar.js"></script> Answer posted by Support on Jul 16, 2008 02:33 All necessary files included and order is correct If problem still occurs for you - please provide any kind of sample or demo link where issue can be reconstructed. Answer posted by Tejas Shah on Jul 17, 2008 02:47 Hi, Is this Ordering Correct ? <%-------------------------------------------------- CSS Files required for this page : S -----------------------------------------------------------%> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/css/common.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/css/modalbox.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxTabbar/codebase/dhtmlxtabbar.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxTabbar/common/style.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxColorPicker/codebase/dhtmlxcolorpicker.css"/> <%-- Following css file is used for DHTMLX Calendar, By Tejas for rajasekhar, 04/Jul/2008 : S --%> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxCalendar/codebase/dhtmlxcalendar.css"/> <%-- Following css file is used for DHTMLX Calendar, By Tejas for rajasekhar, 04/Jul/2008 : E --%> <%-- CSS File needed for DHTMLX Grid : S, By Tejas, 2/Jul/2008 --%> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/dhtmlxmenu.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/context.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/common/dhtmlxmenu_alter.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/common/dhtmlxmenu_xp.css"/> <%-- CSS File needed for DHTMLX Grid : E, By Tejas, 2/Jul/2008 --%> <!-- About Radio Button --> <link type="text/css" rel="stylesheet" media="screen" href="<c:out value="${path}"/>/css/code.css"/> <link type="text/css" rel="stylesheet" media="screen" href="<c:out value="${path}"/>/css/form.css"/> <!-- End Radio Button --> <%-- CSS File needed for DHTMLX Tree : E, By Tejas, Aziza, Manoj on 15/Jul/2008 --%> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxTree/codebase/common/style.css"/> <link type="text/css" rel="stylesheet" href="<c:out value="${path}"/>/js/dhtmlx/dhtmlxTree/codebase/dhtmlxtree.css"/> <%-- CSS File needed for DHTMLX Tree : E, By Tejas, Aziza, Manoj on 15/Jul/2008 --%> <!--- overwrite Context.css to use gradient vertical panel and bordered selection ---> <style type="text/css"> .contextMenu{ font-family:arial; font-size:8pt; padding:1 1 1 2; margin: 0 1 0 1; text-align:left; cursor:default; } .contextMenuOver, .contextMenuDown{ font-family:arial; font-size:8pt; padding:0 0 0 1; margin: 0 1 0 1; text-align:left; background-color:#ffcc33; color:#ffcc33; cursor:default; border:1px solid navy; } .contextMenuOver td{ color:navy; } .menuTable{ background-color : #ffffff; border:1px solid; margin : 0px; padding : 3 1 4 1; background-repeat : repeat-y; background-image : url('/db4/images/bg_grad.gif'); } .secondMenuTable{ background-color : white; border: 1px solid #808080; border-right:2px outset #ffffff; border-bottom:2px outset #ffffff; margin : 0px; padding : 0 1 0 2; margin-top:-1px; background-repeat : repeat-y; background-image : url('/db4/images/bg_grad.gif'); } </style> <%-------------------------------------------------- CSS Files required for this page : E -----------------------------------------------------------%> <%-------------------------------------------------- JS Files required for this page : S -----------------------------------------------------------%> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/prototype.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/scriptaculous.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/settings/myprofile/myprofile.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/settings/getcontrol.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/common/common.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dci2.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/common/csssettings.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/modalbox.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/settings/design/designSettings.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxTabbar/codebase/dhtmlxcommon.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxTabbar/codebase/dhtmlxtabbar.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/settings/colorpicker.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxColorPicker/codebase/dhtmlxcolorpicker.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/settings/users/validateuser.js"></script> <script src="<c:out value="${path}"/>/js/settings/users/processuser.js"></script> <script type="text/javascript"> var Gpath="<%=path%>"; </script> <%-- JS Files needed for DHTMLX Grid : S, By Tejas, 2/Jul/2008 --%> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/dhtmlxcommon.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script> <%--<script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_drag.js"></script> --%> <%-- JS Files needed for DHTMLX Grid : E, By Tejas, 2/Jul/2008 --%> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/settings/groups/groups.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/micoxUpload.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_pgn.js"></script> <%-- This js file is for pagination --%> <script language="javascript" src="<c:out value="${path}"/>/js/settings/fundadmin/createfund.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxCalendar/codebase/dhtmlxcommon.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxCalendar/codebase/dhtmlxcalendar.js"></script> <%-- Following script function is used for DHTMLX Calendar, By Tejas, 04/Jul/2008 : S --%> <%-- JS Files needed for DHTMLX Grid : S, By Tejas, 2/Jul/2008 --%> <%--<script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/dhtmlxcommon.js"></script> --%> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/dhtmlxprotobar.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/dhtmlxmenubar.js"></script> <%-- This js file is for menubar --%> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxMenu/codebase/dhtmlxmenubar_cp.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_link.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_nxml.js"></script> <%-- This JS file is useful for getting grid data in CSV format;serializeToCSV(); --%> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_dhxcalendar.js"></script> <%-- This JS file is useful for showing dhxCalendar type in the cell of DHTMLXGrid object --%> <%-- JS Files needed for DHTMLX Grid : E, By Tejas, 2/Jul/2008 --%> <%-- JS Files needed for DHTMLX Tree : S, By Tejas, Aziza, Manoj on 2/Jul/2008 --%> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxTree/codebase/dhtmlxcommon.js"></script> <script type="text/javascript" language="javascript" src="<c:out value="${path}"/>/js/dhtmlx/dhtmlxTree/codebase/dhtmlxtree.js"></script> <%-- JS Files needed for DHTMLX Tree : E, By Tejas, Aziza, Manoj on 2/Jul/2008 --%> <script language="javascript" src="<c:out value="${path}"/>/js/custom-form-elements.js"></script> <script> var mCal; //var dateFrom = null; //var dateTo = null; function datePicker(id) { mCal = new dhtmlxCalendarObject(id); mCal.setYearsRange(2000, 2500); mCal.setDateFormat('%m/%d/%Y'); mCal.setPosition(380,300); } </script> <script> defaultGridRows=<s:property value="${defaultGridRowNo}" />; </script> <%-------------------------------------------------- JS Files required for this page : E -----------------------------------------------------------%> Answer posted by Support on Jul 17, 2008 08:30 Order is correct By the way, you need not load dhtmlxcommon.js from all components - this is the same file, it can be loaded only once ( it will not cause an error in any case ) |