» Forums
» DynarchMenu forum
» Support
» avoid the message: error: menu element not found
avoid the message: error: menu element not found
2006/09/12 11:07
Viewed 3328 times
Replies: 1/3

Hi!

How can I avoid the messagebox:
error: menu element not found within pages, where I do not have a DynarchMenu?

I have many pages and they all include "header.php". header.php is the place, where the body-tag
is located (including call of DynarchMenu.setup).

I have no chance to customize header.php -> this file must be the same for every
page (with and without a DynarchMenu).

Thanks!
digo

Re: avoid the message: error: menu element not found
2006/09/12 14:20
Viewed 4927 times
Replies: 1/2

A simple workaround is to include this script section in your pages, after including hmenu.js:

<script type="text/javascript">
DynarchMenu.__orig_setup = DynarchMenu.setup;
DynarchMenu.setup = function(id, args) {
var el = document.getElementById(id);
if (el) {
return DynarchMenu.__orig_setup(el, args);
}
};
</script>
last
Re[2]: avoid the message: error: menu element not found
2006/09/13 08:54
Viewed 6374 times
Replies: 1/1

Thanks for your reply! It works perfect

digo

last
Google