| menu setup ¶ | |
| hi. i have a problem with IE if i want to do call DynarchMenu.setup() after building the menu list <ul>...</ul> and not to onload event of the body. in firefox this works just fine, but in IE i get the error "internet explorer could not open internet site http://.... operation aborted" does anyone know how to workaround this? thank you. | |
| Re: menu setup ¶ | |
| I remember seing the same problem in IE some time ago, though I don't exactly know what was the cause. However, your way is not the recommended way to setup the menu because DynarchMenu.setup needs to modify the document in order to generate menus. Trying to do this before the document has finished loading can generate a bunch of errors, depending on browser and connection speed. For instance, the hmenu.js file may not have finished loading, which will generate an error like “Undefined is null or not an object™ | |
| last |
| Re[2]: menu setup ¶ | |
| the reason that i wanted to do that is because i replaced an old menu and i wanted to keep the same usage. i mean i had a file with the whole menu (the scripts including, menu generation) and included this in every page of the app (somenthing like <%@include file="menu"%>), and the job was done. the only thing i had to do is to change the menu file to be included. now i have to modify all the pages and i have to add the onload to the body to every page...but anyway, i understand what you are saying. i could try to dynamically add (append) to the onload event handler my DynarchMenu.setup()....maybe this will work. thank you. | |
| last |
| Re: menu setup ¶ | |
| I just ran into this problem as well. Fortunately, I had run into this when working on some Google maps stuff, and found an excellent solution that's very easy to implement. The solution is described here: // solution -- move the "loading" code to a callback function and trigger it by timer function {$main_menu_id}_setupMenu() Enjoy! Alan | |
| last |
| Re[2]: menu setup ¶ | |
| oops... left some PHP in there. This is a bit cleaner: setTimeout("myMenuId_setupMenu()", 1); function myMenuId_setupMenu() | |
| last |














