Re[7]: Context menu and main menu
2004/11/22 11:05
Viewed 21978 times
Replies: 1/2

Yes.  To  give you an example:

<script type="text/javascript">
function init() {
DynarchMenu.setup("page-menu");
DynarchMenu.setup("context-menu", { context: true });
}
</script>

...

<body onload="init()">

...

<ul id="page-menu">
<!-- this will be the main menu bar -->
</ul>

...

<ul id="context-menu" style="display: none">
<!-- this will be the context menu -->
</ul>

Note that I added style="display: none" to the context menu UL to prevent it from displaying during the short period between the momen when page started loaded and the moment onload is called. You can use this technique for the first UL too, but it might be not desirable because the UL should stay visible for browsers where JS is disabled or don't support DynarchMenu.

I hope this helps.

Re[8]: Context menu and main menu
2004/11/22 11:24
Viewed 24103 times
Replies: 1/1

Thank you! I tried that same thing I think, must be user error ;) I'll take a look tonight and see. Thanks!

last
Re[9]: Context menu and main menu
2006/03/31 10:43
Viewed 18997 times
Replies: 0/0

Hi,

I have an equal problem running a main menu in the main frame and a context menu needed in an iframe. in the main html file. Using the onload function for id="menu" and inside an iframe placed on the main html file, i also load a menu using the onload function for id="contextMenu". It will run into a conflict. the context menu will be loaded and than a javascript error will occur "Error: menu element not found". The main menu won't be loaded. If i use the same name for both menu's, the main menu will be loaded empty into the iframe instead of the mainframe???
Isn't it possible to use diffrent menus in diffrent frames???

last
Google