Re: menu setup
2004/11/18 09:09
Viewed 9868 times
Replies: 1/2

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™

Re[2]: menu setup
2004/11/18 10:08
Viewed 12051 times
Replies: 1/1
by vrnb

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[3]: menu setup
2004/11/18 10:28
Viewed 14242 times
Replies: 0/0

There's another variant, if for some reason you can't add attributes on <body>.  You should be able to include the following snippet at any place in the document and it should still work fine.

<script type="text/javascript">
window.onload = function() {
DynarchMenu.setup('menuid');
};
</script>

Hope this helps.

last
Google