Categories | Question details Back To List | ||||||||
DHTML2 MENU - IE ERROR (Operation Abroad) (A) I am using Dhtmlx2 Menu. I am facing to an issue where it seems to be weird now. When i am having menu initiating script in side the main <table>, it gives me an error. Only in IE. I searched over the net and this is what i got. http://weblogs.asp.net/infinitiesloop/archive/2006/11/02/Dealing-with-IE-_2600_quot_3B00_Operation-Aborted_2600_quot_3B002E00_-Or_2C00_-how-to-Crash-IE.aspx Its a common issue in IE it seems. When i am having the script out side of the <table> Before or after.. it works. But it affects with other components in my application. So what i tried was to initiate the script in <head>. Its not working since the menu <div> should be defined before the init script. Are there any solution for me ? (B) When i have setOverflowHeight(), it affects only to the first menu level. for sub menus it shows only 1 item with the scroller. So it hard to navigate when i have 20+ items in sub menus. With DHTMLX 1.0 this was fine. Thank you. Shehan Answer posted by Support on Nov 03, 2008 01:30 >> (A) Could you please provide your source code? >> (B) Could you please provide menu struct? And value for setOverflowHeight()? Answer posted by Shehan on Nov 03, 2008 05:50 (A) I have attached the index.html file. http://kindermovies.com/shehan/menu/index.html Visit above link. You will get the error. (Please refresh 1,2 times) If I place the script after or before the <table> it works fine. In my site structure i have to place this script between the table since it runs under a template engine. What may be the solution for me ? Thanks, Shehan Attachments (1)
Answer posted by Support on Nov 03, 2008 06:12 (A) Try do the following: <body onload="doOnLoad();">(B) Your new_xml_menu.xml (from link above) was checked with setOverflowHeight(4) - all works fine. Note that setOverflowHeight() should be called after xml completely loaded, for example: menu.loadXML("xml_menu/new_xml_menu.xml", function(){menu.setOverflowHeight(4);}); Answer posted by Shehan on Nov 03, 2008 21:42 (A) It works fine without throwing any error in IE. In my application i have used DHTMLX Grid a lot. So when i reach to a page where any grids integrated, it takes time to load. Its waiting for the grid to be loaded first. Then only the menu is loading. Can we get rid of this ? (B) This is working fine. Regds, Shehan Answer posted by Support on Nov 04, 2008 01:42 >>Its waiting for the grid to be loaded first. Then only the menu is loading. In case of using of onload event - code will fire only after all content loaded. So it will wait while all script loaded. Instead of using onload, you can reorganize your code as <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div id="menuObj"></div></td> </tr> <tr> <td> </td> </tr> </table> <script> //script placed at bottom of body, without any surrounding tags var menu; menu = new dhtmlXMenuObject("menuObj","standard"); menu.loadXML("xml_menu/new_xml_menu.xml"); </script> </body> Answer posted by Shehan on Nov 04, 2008 02:22 It is not possible to have script at the end. The reason is the menu loads after every other scripts in my application. I am not using the onload event now. But I can't have this script in the place where i want this to be init, since the IE error which we discussed above. The solution will be initiating the script within <head>. But then menu is not working because of the <div> reference comes in below. If I can use the code like, <script> ... menu init </script> <div id="menuContainer"></div> Then this problem will get solved. Now the menu is appearing at last after everything loaded. (even with the suggestion you've made in previous post) Answer posted by Support on Nov 04, 2008 07:48 IE throws an error , if content attached to document.body while rendering of body not finished. There are only two ways to workaround issue a) init code after document already loaded ( onload solution ) b) place code at bottom of html file and of course menu init need to be placed after menus container HTML. |