Categories | Question details Back To List | ||
Getting error while loading menu I am getting the error on my web page when I try to add menu to dHTMLX Grid The error says "Internet Explorer cannot open thr Intenet Site http://localhost/......../....aspx. Operation Aborted" The code I am using is as follows
< div id="menuData" style="display: none;"> <!-- file --> <div id="m1" text="File"> <div id="m12" text="Open"><hotkey>Ctrl+O</hotkey></div> <div id="m13" text="Save" img="save.gif" imgdis="save_dis.gif"><hotkey>Ctrl+S</hotkey></div> <div id="m14" text="Save As..." enabled="false"></div> </div> </div>
< script language="javascript" type="text/javascript">menu = new dhtmlXMenuObject(null, "standard");menu.setImagePath( "../../../dhtmlxMenu/codebase/imgs/");menu.setIconsPath( "../images/");menu.renderAsContextMenu(); menu.setOpenMode( "web");menu.attachEvent( "onClick", onButtonClick);menu.loadFromHTML( "menuData", true);mygrid1 = new dhtmlXGridObject('gridbox1');mygrid1.selMultiRows = true;mygrid1.setImagePath( "../../../includes/dHTMLX/imgs/csh_yellowbooks/"); //mygrid1.setInitWidths("250,200,150")mygrid1.setInitWidths( "170,120,130,100,250");mygrid1.setHeader( " Value1, Value2, Value3, Value4,Value5");mygrid1.setColAlign( "left,left,left,left,left")mygrid1.setColTypes( "tree,ro,ro,ro,ro");mygrid1.setColSorting( "str,str,str,str,str")mygrid1.setColumnColor( "#ffffff")mygrid1.enableTreeCellEdit( false);mygrid1.attachHeader( "#select_filter,#text_filter,#text_filter,#text_filter,#text_filter")mygrid1.enableDragAndDrop( true);mygrid1.setDragBehavior( "complex");mygrid1.enableTreeGridLines(); mygrid1.enableMercyDrag( true);mygrid1.enableContextMenu(menu); mygrid1.attachEvent( "onBeforeDrag", test);mygrid1.init(); var ztree = '<%=zsampleTreeXML%>';document.getElementById( "datapointTreeXML").value = ztree;mygrid1.parse(ztree); function onButtonClick(menuitemId, type) { alert(menuitemId); // return true} function test(id) { if (mygrid1.hasChildren(id)) { alert( "Cannot select Table for drag-n-drop. Please select leaf node only"); return false ;} else { return true;}
} </ script>Answer posted by Alex (support) on May 11, 2009 07:45 The code looks correct except <hotkey> tags inside <div>. Try to exclude <hotkey> tags. Answer posted by Prashant on May 11, 2009 13:58
I tried after removing the hotkey node but still it didn't worked
Answer posted by Alex (support) on May 12, 2009 01:08 The following html allows to correctly intialize menu: <div id="menuData" style="display: none;"> If the problem isn't solved, please, provide the complete sample to reproduce it to support@dhtmlx.com. |